Dear Visitors:

Please scroll down the page to see present and archive blogs.

Thank you very much: Tramway Null(0)

Webrings - Maps - Trolleys and More

Navigation by WebRing.
Showing posts with label ARCGIS. Show all posts
Showing posts with label ARCGIS. Show all posts

Thursday, December 21, 2017

K Nearest Subway Station to Next Station in Feet: 14th Street Area & Williamsburg Brooklyn

In the map above, produced in ARCGIS, I  used a QGIS produced output of K-Nearest Neighbors from the Distance Matrix.   I joined that table to a previously produced map layer showing NYC subway stations.  I used the previous layer showing the new serial numbers.   I joined the layers together using ARCGIS.   The results are as follows: From top to bottom for each station:

Station Serial Number
Station Name
Nearest Station Serial Number
Shortest Distance in Feet

Thus for the 14th Street 1st Avenue Station "L Line"
Station Serial # 195
Station Label:  1 AV
Nearest Station to this station: 194  ( 3rd Avenue and 14 Street)
Distance in Feet (straight Line)    1424.2 Feet.

Another Example
Station Serial # 133
Station Name;  Astor Place
Nearest Station to this Station: 215 ( 8th Street NYU)
Distance in Feet: 443.466


Wednesday, December 20, 2017

How to Calculate Distances between Subway Stations Using ARCGIS and QGIS










































  In this exercise, we will try to develop a matrx of distances between all subway stations, including Staten Island Rapid Transit.  You may do so for your own system that you are interested in.    Thus, if we are interested in the new Second Avenue Subway Station at 96th Street and Second Avenue ( my reference number 205 ), we can observe the distance to the 71 St. Forest Hills Station ( Reference Number 427 ).    From the chart, we can see that it is 36,457.72 feet, or 6.90487 miles.  I only did this analysis for the new Second Avenue Stations ( 203 to 205 Serial Numbers).  Thus the 96 th Street Station has 493 distances to all the other stations.  This is a large amount of material to post on a log and I am not giving you the serial numbers of all stations.   Let me know if you need them.

At any rate, I hope to show you how to do this soon.

To start, you need a mapping program and a shape (*.shp) file.  ARCGIS is a big mapping program but it not free.  QGIS is a free open source software for maps.   Download a shape file for your subway stop locations.   If you want to see the line itself, (subway lines), you will need to download a shape file of the subway line.  This analysis will use only subway stops.


Once you have a shape file of subway stations, you will need to make a slight alteration to the table that lists all the subway stations.  In ARCGIS, the FID identification column begins with a zero.   Many distance tools can not read a list that has a unique serial number that begins with zero.  In ARCGIS  while in the table mode for your shapefile, create a new column.  I call mine "Newserial".  Use the field calculator to add one to the FID number:   NEWSERIAL = FID +1.   You will get a serial number that begins with 1 and you can start to do various analysis.   Incidentally, the Newserial number is the number that I use to identify the subway stations in this exercise.  If you are using ARCGIS and do not have full tool availability (Advanced Package), you will need to bring up the shape station file in QGIS.     Bring your vector station file, and then choose, vector, analyst tools and then the Distance Matrix.   The unique identifier is the serial number with no duplicates.   Choose one of the variations and make sure you designate an output file.   Let us say, the your file contains 150 stations, locations, or whatever points you are using to analyze.   You will be returned with a csv file with point 1 and 149 locations, point 2 with 149 locations until point 150 with 149 other locations.  For the New York City subway system, the number of locals is large so I could not give you all of them.   On the map, the Second Avenue Line is not shown, only the stations.  Staten Island Rapid Transit stations are also included in the analysis.  Staten Island Stations are  #493 St George to #473 Tottenville,   Far Rockaway Mott Avenue is 451 and Pelham Bay Park is 45.

Therefore, the distance between 2nd Avenue - 96 Street (Ref. 205) to Tottenville, (Ref. 473) is 130, 162.6 feet or 24.65 miles as the birds fly.

Tramway Null()

Friday, July 1, 2016

First Interpolation Experiment Fails



Hi Folks:

  I started to experiment with ARCGIS on-line and I noticed that geostatistical interpolation is offered.  Interpolation is used where you have some data points on a map but some areas of the map are missing data.  Now let us apply this to rapid transit.  Let us say that we have ridership figures for subway stations.  Several years ago, I got a shape file of subway station locations in New York City and part of the file was ridership values for various years such as total ridership, average ridership on weekends and so on.  Let us run a experiment using interpolation.  How would interpolation treat those areas not covered by the subway system?  The results are shown above to the right, but we must mention that perhaps that this may not be a good statistical rational for doing this experiment.  My aim was:   Using known ridership at various stations, can I project to areas that do not have a subway?  The map above may be a failure.

In the analysis below, I used Annual 2000 data.  The highest value for a particular station was  in the 8 - 9 million range.   ARCGIS online will ask you how you will project the data and I chose "Manual".   I added discrete ranges of data for example, 2M, 4M, 6M, 8M and 10M.  In the interpolation panel, you should add these values numerically, i.e. "2,000,000".  The results show those areas that can generate riders of that value if a station was in that area, everything else being equal.  Thus the eastern side of Brooklyn near Marine Park could generate 2M - 4M at a subway station annually, if a station existed in the particular region.  For Staten Island, though not shown would generate 0 - 2M.   In Staten Island, the SIRT station data had no ridership values for FY 2000 and I could not select this out.  Notice the areas of eastern Queens and Western Manhattan (Before Hudson Yards).  This is experimental process may not be appropriate for the data set available.  It is an old data set and much has changed since 2000, particularly in some sections in Brooklyn like Williamsburgh.  All of Staten Island is the lightest color.  I am not sure if bodies of water (NY Bay) effects the results.  Notice that eastern Queens looks like it could use some additional rapid transit facilities.  My cheap solution:   A basic light rail line running down a wide avenue with a private right of way.  These lines should fan out from the last easterly station terminals of the subway.  If extra money is available, if possible, the light rail lines should go underground near the last stops if possible and provide cross the platform transfers to the subway.  Since some of the terminals, such as Archer-Pasrsons have two trailing tracks, perhaps light rail trains can inch up to the easterly sections of the terminals to provide platform level transfers.  The light rail trains need not be very high tech nor their stations.  How about some surplus equipment from Europe?  Just thinking out loud folks.
Tramway Null(0).


Saturday, December 5, 2015

GeoReferencing a 1766 Red Hook and Downtown Brooklyn Map



Hi Folks:

  I came across an interesting web site that deals with some of the material found here but in a more historical fashion.  It is called Ephemeral New York  https://ephemeralnewyork.wordpress.com/.


I came across an interesting map from that site.  I was not able to get the source but it seems to be an early map of the City of Brooklyn in 1766-7.   At that time, what is now the borough of Brooklyn, consisted of a number of small towns, some dating back to early Dutch settlement.  Then, the town of Brooklyn was around the area nearest Manhattan (New York) and consisted of the area of present day downtown Brooklyn and Red Hook.  The map was truncated so I could not get the names of the owners in the legend.

  This is the map posted in Ephemeral New York.  There does not appear to be many streets except the "Road to Flatbush" and the "Road to Jamaica", which were towns further to the east on Long Island.  The road to Flatbush probably became Flatbush Avenue and the other road to Jamaica may have become "Fulton Street".  These road split as shown on the map and will become an important point to georeference using ARCGIS.  It is interesting to note that on this map, surveyed in the years 1766 and 1767, elevation was taken into account on what appears to be hills.  On this map, the hills appear to be brown and have a contour appearance, like a modern contour map.

Using Adobe, I transfered the above map from a xxx file into a TIFF file, which is a raster file in ARCGIS.  Using  a modern street grid of Brooklyn ( from Bytes of the Big Apple), I started the georeferencing process.  Notice from the old map the the coast line is not the same as we have today.  Apparently, there have been much landfill in the past 250 years.  Acting very fast, I did no research on the points listed on the map to get a more accurate overlay, but I did use one point on the old map where the road to Flatbush splits off from the road to Jamaica.  This is the Flatbush Fulton Street intersection.  The modern streets today may not be in the exact location shown on the map 250 years ago.  I also picked a point near Wallabout Bay and crossed referenced it on a modern map since the shape of the coastline appears the same.  I also picked an arbitrary point on Governours Island as well.

  Notice how the resultant georefeneced map is distorted.  In the base ARCGIS map, I  brought in the modern subway system and stop file and the street grid.  The results are not perfect but shows on the 1766 map where the modern street grid may fall, perhaps.
   I noticed that the "hill" areas on the 1766 map appear somewhat accurate.  One way to test this is to bring in a modern contour map and see if the concentration of contour lines really correspond to a hill on the 1766 map.

  In this frame  above, the hilly areas are show by a concentration of dark lines.  It is hard to see the original hill drawings on the 1766 map so I lightened the contour lines by changing the display percentage.

Generally the increase in slope shown by the contour lines on the modern map corresponds to the hilly areas shown on the 1766 map, even after 250 years of development on the surface.

Although not shown on the subway map above, but the street elevation at Bergen and Smith Streets is 24 feet ( this will need to be verified ).  This station may have had a water condition that resulted in the closing of the lower level (Express) platforms.  This area may have been adjacent to the Gowanas Canal but the elevation is high.  This will be discussed later.  Thanks folks: Tramway null (0).