User:Blocal186/UsingPasdaRestData

From OpenStreetMap Wiki
Jump to navigation Jump to search

PASDA Rest Service

List all Town Routes

This is an example of using the PASDA rest service to get some useful data. For this example I will be using the following: https://mapservices.pasda.psu.edu/server/rest/services/pasda/ColumbiaCounty/MapServer.

First, we need to know what data we want. Lets look at the "Columbia County Road Centerlines 202402" layer. Look at the fields. Some fields can be cryptic, you can look at the metadata (link at bottom of the page) which will likely still not offer a description. Looking for the dataset on the main page may help but probably wont.

From use, I know that ctyroute is the Township Road identifier for the roads. These are sometimes not signed, signed as TRXXX, TXXX, or just XXX. In Pennsylvania, we tracked these under the key [unsigned_ref=TXXX]. Lets make a list of all township roads that are in this dataset. Lets also get the roads normal name from the field fullname. Scroll to the bottom of the page and click Query.

In the Where clause we will use ctyroute <> '' which is city route is not equal to blank. Out Fields will be fullname,ctyroute. And select Return Geometry: False.

Press `Query (GET)`

At the bottom of the page you now have a list of all street names and their city route number.

List all State Routes

Lets improve the above example to be more usable. First, lets update our query to find which State Routes are in the county. Our Where clause is now stroute <> ''. Update our Out Field to fullname,stroute. Lets order our output by state route number by setting Order By Fields to stroute. Now remove duplicate entries by setting Return Distinct Values to True. Run the query. Great, but where are these roads? Add ,munileft,muniright to the Out Fields. Run the query again. Great now we know what township these roads are in, and what their route number is.

But why do the routes start in the 1000? We know the Key:ref:penndot page that routes 0-999 are the most important signed routes. So where is route 118 that runs across the north of the county? Take a look at the following:

fullname: Golf Course Rd

stroute: 1037

munileft: North Centre Township

muniright: North Centre Township


fullname: State Route 118

stroute: 118

munileft: Sugarloaf Township

muniright: Sugarloaf Township


fullname: State Route 118

stroute: 118

munileft: Jackson Township

muniright: Jackson Township


fullname: Ideal Park Rd

stroute: 2001

munileft: Locust Township

muniright: Locust Township

The list is sorted using alphabetical sorting. So "11" comes after "10". This is important to keep in mind if you are manually searching the data.

Bring it to ID

This is great, but I don't have time to look for all of these roads by name to check them. Wouldn't it be easier to make a custom overlay?


For this demonstration I want to check on route 118, so lets limit our output by settings Where to stroute = '118'. Turn back on geometry by selecting Return Geometry: True. Next select a more useful output format, Format: GeoJSON. Press Query (GET) and check out the results. Much more helpful... save the page as a .geojson file.


Lets make this make sense and open the ID editor on the OSM website. On the right side select the Line / Box icon to open the Map Data panel. Click on the ellipsis next to Custom Map Data. Browse for the file on your computer and click ok. Press the "Zoom to data" button next to the ellipsis. You now have a line showing where the route should be and can be used to verify the routes existence.

Bring it to JOSM

todo