Hacker News new | ask | show | jobs
by otter-in-a-suit 1231 days ago
TIL. I used what I got from my rural county’s website / GIS (hence kml) - I wonder if I could get proper shape files by calling their GIS department.
1 comments

Shapefiles are no more proper than KML, I'd even say KML is a better format, since it's a single file and doesn't have the archaic name limitations of SHP.
KMLs do not have a spatial index. Reading a properly constructed shapefile with 2m points is fine, and running a SQL query on it is also fine. Trying to do that with an xml based file is not fine. Each of the major GIS packages spends quite a bit of effort to convert kml to an in memory spatially indexed dataset on ingestion. Shapefile conversely does not have to sit entirely in memory to still be reasonably quick.

Shapefiles do have the anyone field name length limit, among a few other things, but alternate formats that recognise that issue have existed and been popular for well over 20 years.

In other news, geopackage is based upon sqllite, supports long field names, a good assortment of data types, and is finding good adoption among many facets of spatial products from desktop to scripting, etc.

Shapefiles are faster to read.