Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don't they all work with ESRI Shapefiles?


Can you explain in more detail what you are asking?

In general, the Android/ios apps have their own file formats and then have a PC tool for generating those maps. It's relatively trivial to feed a shapefile into those generators (install GDAL/OGR and convert to a format the tool accepts), but there is not really a standard schema in use in shapefiles so it is also necessary to map the attributes in the shapefile over to something the app will understand (or to provide a custom style to the app that is based on the shapefile schema).


My understanding (and I only have a passing knowledge about GIS data formats) is that the ESRI shapefile is the closest to a vector data format that most/all mapping software supports.

I wasn't aware that shapefiles aren't standardised. From the Wikipedia page (https://en.wikipedia.org/wiki/Shapefile ), it looks like this is the official spec:

http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf

Do you have any examples of implementations that differ from this spec?


A shapefile is just like a CSV file, but each row also has a geometry shape. The columns are totally arbitrary and could be anything. That's the "shapefile spec". How are roads stored? What about highways/motorways with 2 carriageways? Is that 2 one way lines, or 1 line through the middle? Is the name of the road given in the shapefile? What column stores it? "NAME"? What about the speed limit? "MAXSPEED"? "SPEEDLIMIT"? What units is that speed limit in? mph? kmph? What about having a textual speed limit definition, then you'd have to parse "30 M.P.H." as a speed limit. etc. etc. etc.


What I'm talking about would probably fall under "Organization of the dBASE file". Except it's left to the user.

Is a street name given under "FULLNAME" or is is only provided in the parts "PREFIX" "NAME" "SUFFIX". How are various things categorized. Is there a "FUNCTION" column, or a "USE" column. To be useful, software needs instructions how to interpret that information. That's what I meant by a style.

As an example, it might be necessary to map a value of "A41" given in the "CFCC" column to an osm property like "highway=residential". This is a real example from the US imports of TIGER data. A41 means "Local, neighborhood, and rural road, city street, unseparated.", so that mapping is a little bit unfortunate, as in OSM, highway=residential is unlikely for a rural road.

As far as shapefiles being a vector data format that mapping software supports, the device apps aren't really mapping software in that sense, they are too specialized (I think in large part because users of that software expect premade feature styling).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: