Closed qjhart closed 8 years ago
Updated description to eliminate file
Don't see a huge savings on the inputs for that, esp. w.r.t using the GeometryCollection as decided above. I guess I do see a savings in output, but then I'm less excited about not using geojson for that complex response. Protocol Buffers :)
Using the GeometryCollection, they would be. I prefer the put those through the MD5 blender, just so they match paths as well. I threw in the FeatureCollection, predominantly so a client wouldn't have to check that no points had matching coordinates. I would assume we'd use the GeometryCollection method, so I don't mind starting with that.
The current proposal has two FeatureCollections. Both are reasonable. I assumed options could include, paths=false; network=true
, which is way i made them separate. The reason to not put the route in the 'paths' column is for a few reasons.
Follow ups. What datasets and software are you looking to use to create this service?
Comments updated above.
For the datasets, I plan to use the BTS transportation atlas. Specifically, the Freight Analysis Framework FAF data.
For software, pgrouting, part of postgresql. Previously I did this by adding extra nodes to that routing table, don't think we want to do that this time around.
Quick overview of the previous FAF based version of the pgRouting.
@qjhart
Couple first pass questions. First, you say pgRouting is used, but I don't see any pgr_ methods in the SQL. Second, what role is ArcGIS playing in this? Is there a ArcGIS Server, NAServer service in this picture somewhere?
Started a script for importing osm road data into pgrouting 113739a0e366ab949066a3529b668dd22ba21957. It uses this:http://osm2po.de/
pull and run
cd transportation
./import.sh
Will grab 4 states, build a topology for the osm data, merge and place results in data/ahb. The import script will stand up a little service so you can test out the data. in /data/ahb there will be the final .sql file.
Justin needs to get an update on what the transportation cost will really be.
The current transportation stub passes destination as a [longituge,latitude] pair, and an array of sources as [[lon,lat],[lon,lat]. The response is geojson, as an (array?) for linestring geojson features including a distance as a property.
I suggest the transportation function passes in a src geojson object, a destination geojson object, and a set of json options. The results is a geojson featureCollection of the transportation network used, including the paths traveled on it, and a separate geojson featureCollection of the paths traveled. This could also be a single FeatureCollection with feature types differentiated by there use. Features should include an identifier.
A source and destination can also be a geometry collection, in which case identifiers are calculated for the points and destinations. The IDs are MD5 calculations of the geometries. Features without id's are considered to be simple geometries, and their ID's calculated the same way.
The service takes the centroid of all sources and destinations, so the client should think about doing that before sending.
Input:
For the output, the id's are calculated in a similar manner, the MD5 of the geometries are used for the id's of the paths. The source and destination match the input data. Similarly, the id's for the features in the network are MD5's of the geometry of the features as well.
Output:
This allows a client to add new paths incrementally. The id's for the paths and network will be constant from one call to the next.