1

I am writing a native iOS app and need to serve property boundary data as a layer on top of a Google Map. I am an experienced iOS developer, but have little experience in GIS or server-side work (may become obvious as you read on..)!

The raw data is in the form of five shapefiles, each up to three GB in size. I am relaxed about whether these are combined into a single layer or shown separately. I would receive updates to these shapefiles every few months.

I need to display this property boundary layer at high levels of zoom (16+), as i will be working with single properties at a time.

As I understand it, my options (roughly) are:

1:

Build a system that generates the raster or vector tiles on the fly as I request the data for a specific region at a specific zoom level. The nice thing about this is that shapefile updates are easy to handle, as I just need to replace the old shapefiles in my database each time. I understand there would be a bit of a delay serving the tiles but this is not a deal breaker as long as the delay is not too long.

If I am going to use raster tiles I need to receive them using a URL format like this: http://www.mytileserver.com/tiles/somesortofsecuritykey/layeridentifier/[x]/[y]/[z].png

2:

Use TileMill or similar to create raster tiles for the entire dataset at the levels of zoom I need. This may not be practical as my database would be enormous (I am planning to use AWS S3/EC2 or similar, but still...), but if it did work there would be low latency for my users. This would also be a pain when dealing with updates as I would have to regenerate the entire tile set each time I received updates.

3:

Convert the data to GeoJSON or similar and use the Google Maps functionality to draw polylines to represent the boundary data based on the polygon coordinates. I would only want to do this at the higher zoom levels so I’m not drawing thousands of polylines to the screen.

I understand QGIS or ogr2ogr will convert a shapefile to GeoJSON. Would a large (3-4 GB) file pose a problem?

If I am going to receive the GeoJSON data I can query it so I only get back the geometry for the portion of the map that is displayed on the screen at any one time?

4:

Some sort of hybrid system of #2 and #3 where I use tiles at say zoom levels of 16-18 and draw polylines based on GeoJSON for zoom 19+.

Given my requirements, can anyone recommend an option to pursue further?

Or is there a totally different approach to consider?

closed as too broad by PolyGeo Feb 4 '17 at 12:12

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What sounds wrong to me is converting your shapes(-> vector data) to raster tiles (your option 2). If you want to use geojson (your option 3) you need to simplify it. Use topojson to make your geojson smaller (github.com/topojson/topojson). You further need to simplify the geometries. At a high zoomlevel there is no need to display the geojson in its full resolution. See mapshaper.org for example. BUT, do you have to use googlemaps? You could create vectortiles gis.stackexchange.com/questions/190390/… and load it – Stophface Feb 4 '17 at 12:02
  • As it stands I think you are asking multiple questions which goes against our Tour. I think you should decide which is your main concern and ask about that specifically. – PolyGeo Feb 4 '17 at 12:19
  • 1
    You probably want to review your problem statement, since shapefiles can't exceed 2Gb, and really ought not be used when larger than 100Mb. You're also probably underestimating the size expansion from shapefile to JSON by two orders of magnitude. This question encompasses more issues than I would generally see in a week-long consulting job, possibly in even two weeks (mostly because the software architecture is decided before I am engaged); this is far too large a topic for our "Focused question / Best answer" model. – Vince Feb 4 '17 at 13:55