Geospatial Problems

Other geo spatial probelms that I am working on is give a data set of locations how to show the correct map e.g if the data is for cities in France we dont want to see the Europe Map. So I build an index of locations to maps and I search the index with the narrowest match and show the other maps as an option that the user can select.

Yet another problem I have to solve is to given a GeoJSON map display the label in the right location. The Mapping library I am using just places the label in a centered location based on a rectangle that covers all the polygons that define a region. This is a problem first for a country liked United States as it encompasses disparate states like Alaska, Hawaii. Since United States is a MulitPolygon in GeoJSON we can compute the area for all the polygons and then pick the largest polygon for labeling the region.

Labeling a region is easy for a state like Colorado as it is a large square. It is a problem for a state like New Hampshire and Florida as they are not a rectangle.

Comments

Popular posts from this blog

Spring Framework

Never use a String

JSON Web Token