Author Topic: Finding old Freight cars - would you find this interesting.  (Read 1730 times)

0 Members and 1 Guest are viewing this topic.

wcfn100

  • Crew
  • *
  • Posts: 8946
  • Respect: +1382
    • Chicago Great Western Modeler
Finding old Freight cars - would you find this interesting.
« on: April 16, 2016, 06:59:08 PM »
+2
So based on my thread about getting back into programming, one project I've been wanting to do is use google maps for recording locations for old freight cars.  I do a lot of traveling by car and always find interesting things off the side of the road.  This project would use PHP, mySQL, Javascript and AJAX to a small degree, but the big question is, would you find it useful or interesting?

Here's the link so far.

http://www.cgwmodeler.com/freightcarfinder/fcarfindermap.html

Ultimately it would have it's own domain where users could input coordinates and and photos, but I'm not close to that yet obviously.

So is there an interest, or am I just the old crazy freight car guy?

Jason

Chris333

  • Crew
  • *
  • Posts: 19610
  • Respect: +6935
Re: Finding old Freight cars - would you find this interesting.
« Reply #1 on: April 16, 2016, 07:11:44 PM »
+1
Is there a rewards program involved?  :trollface:

wcfn100

  • Crew
  • *
  • Posts: 8946
  • Respect: +1382
    • Chicago Great Western Modeler
Re: Finding old Freight cars - would you find this interesting.
« Reply #2 on: April 16, 2016, 07:13:36 PM »
0
Is there a rewards program involved?  :trollface:

Yeah, I'll just need your SS# to get you started.

Jason

loyalton

  • Crew
  • *
  • Posts: 98
  • Respect: -17
Re: Finding old Freight cars - would you find this interesting.
« Reply #3 on: April 16, 2016, 08:06:48 PM »
0
That would be great for both surfing the net and for RR-minded travelers.

This can potentially be a lot of work to keep things updated. Private varnish obviously will be away from home base every once in a while but seem to get evicted every few years anyway and have to move elsewhere. Deadlines disappear.

Consider how deeply you want to take this. Do you include converted diners/restaurants? Any railroad museum deserves to be on the list but should you try to picture every car in their collection? Boxcars end up as storage sheds but may not be directly viewable without trespassing. There are flatcars used as bridges. There's wrecks left in place in the middle of nowhere. I'd say yes to all.

wcfn100

  • Crew
  • *
  • Posts: 8946
  • Respect: +1382
    • Chicago Great Western Modeler
Re: Finding old Freight cars - would you find this interesting.
« Reply #4 on: April 16, 2016, 08:17:00 PM »
+1
At the moment the idea is just for cars that are no longer in use such as:

Cars sitting in a field.
Cars at a Museum.
Cars abandoned on track that's been isolated.

Beyond that, once everything is built, it's pretty easy to expand to something else.

I guess the most likely use would be for someone to do a search for a particular road name and see what, if any, old cars are sitting somewhere like the Northern Pacific 16,000 gallon tank car I found in Texas .  For me, it's more about finding certain styles of cars to get pictures of under frames and such.


Jason

cjm413

  • Crew
  • *
  • Posts: 1533
  • Respect: +187
Re: Finding old Freight cars - would you find this interesting.
« Reply #5 on: April 18, 2016, 03:03:07 PM »
0
Yeah, I'll just need your SS# to get you started.

Jason

How about a direct deposit into my luggage?

[/url]

wcfn100

  • Crew
  • *
  • Posts: 8946
  • Respect: +1382
    • Chicago Great Western Modeler
Re: Finding old Freight cars - would you find this interesting.
« Reply #6 on: April 27, 2016, 12:49:28 AM »
0
Well after freezing my nuts off camping at Lake George on Saturday only to come home Sunday and almost have to evacuate my home due to a grass fire, I've been able to make some headway on the freight car map.

A lot of old half-dead brain cells had to fire up again to remember what I could about databases.  I think I have all the relations set up between the 7 tables.  Going to chicken out of many-to-many relationships that pictures of multiple cars could have and just do those by location, hopefully that will work okay.

Got the state drop down working to center the map.  Still have a ton of locations to add (if I can remember where they were :oops:).

Next step is to get some pictures popping on the page along with car data when you click on a location.

Here it is at the moment.

http://www.cgwmodeler.com/freightcarmap/fcmmap.html

If you have any suggestions, now the time to do it before I get to far along. And don't worry about what it looks like, I'll take care of that at the end.


Jason

loyalton

  • Crew
  • *
  • Posts: 98
  • Respect: -17
Re: Finding old Freight cars - would you find this interesting.
« Reply #7 on: April 28, 2016, 12:44:30 AM »
0
Looks good so far; the capsule description with the pin is great. Could there be a loading time or other problems (for you or us) with a North America map and pins as the opening page? If so, the opening page could be an "inert" map and the user would call up a state choice to get their actual start page.

wcfn100

  • Crew
  • *
  • Posts: 8946
  • Respect: +1382
    • Chicago Great Western Modeler
Re: Finding old Freight cars - would you find this interesting.
« Reply #8 on: April 28, 2016, 03:56:59 AM »
0
I'm not sure what's going to happen as the map gets more populated.  I guess at this point, I'm sort of hoping the Google map object has some built in handling that will help.  Otherwise it could be fun to make some sort of algorithm to deal with only those markers that are within the map view based on zoom and map size, but I'm not even worried about that yet.

On a good note, I learned how to pass variables between HTML and ASP pages so now I can pull just the image urls for a location marker that's clicked on (but right now I only have one image for one location :P).

Next step is to pull all car info (kind, builder, etc.) for each car at a particular location when it's clicked, plus try and figure out how to handle a series of pictures for a given car.

I need to remember to clean up my code every night so no one sees my popup window trial and error coding method.   :)


Jason

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 26105
  • Head Kino
  • Respect: +11594
    • Conrail 1285
Re: Finding old Freight cars - would you find this interesting.
« Reply #9 on: April 28, 2016, 09:48:39 AM »
0
Ok, this might sound a bit intimidating, but...
Set it up with a services oriented architecture, so you have the database, an API that talks to the database, and then your web front end.
The reason I say this is because this is absolutely something that lends itself to a mobile app where you can take a photo and upload it to the database from your phone.
You'll want to plan ahead to do that though.

wcfn100

  • Crew
  • *
  • Posts: 8946
  • Respect: +1382
    • Chicago Great Western Modeler
Re: Finding old Freight cars - would you find this interesting.
« Reply #10 on: April 28, 2016, 11:09:30 AM »
0
Ok, this might sound a bit intimidating, but...
Set it up with a services oriented architecture, so you have the database, an API that talks to the database, and then your web front end.
The reason I say this is because this is absolutely something that lends itself to a mobile app where you can take a photo and upload it to the database from your phone.
You'll want to plan ahead to do that though.

From what I see, an API is just a class module on the server that takes care of the DB hits with some public functions for the front end to call.  Is that right?  Would this be a good job for PHP or should I look into something else to build this module?

Since so far 100% of my page content is from the DB or the Google map,  it shouldn't be too hard to port over I wouldn't think.  :?

Jason

Ed Kapuscinski

  • Global Moderator
  • Crew
  • *
  • Posts: 26105
  • Head Kino
  • Respect: +11594
    • Conrail 1285
Re: Finding old Freight cars - would you find this interesting.
« Reply #11 on: April 28, 2016, 11:21:06 AM »
0
So, the API level would be a Web Service (https://en.wikipedia.org/wiki/Web_service) that would handle the database stuff.
This looks like a good intro: https://davidwalsh.name/web-service-php-mysql-xml-json

wcfn100

  • Crew
  • *
  • Posts: 8946
  • Respect: +1382
    • Chicago Great Western Modeler
Re: Finding old Freight cars - would you find this interesting.
« Reply #12 on: April 28, 2016, 11:46:13 AM »
0
This looks like a good intro: https://davidwalsh.name/web-service-php-mysql-xml-json

That how mine works right now.  I call the php file within the HTML in the web page and receive the xml which I then use to build the page items I need.

I have three of these php files for different db queries.  I thought an API would put these into one file with three different function calls.



Jason