Is it possible to determine if a GeoJSON point is inside a GeoJSON polygon using JavasScript?

Seems like d3 has you covered: https://github.com/d3/d3-geo#geoContains d3.geoContains(object, point) Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is … Read more

GeoJson World Database [closed]

Does this need to be a service? Here’s how I’ve approached this in the past, using free/Open Source tools: Download public-domain shape files from Natural Earth Data Use Quantum GIS to convert .shp to .geojson (one step, under “Layer > Save As…”) Now you have hi-res GeoJSON data. This is a really big file, though, … Read more

Convert geopandas shapely polygon to geojson

If you don’t want to create this dict manually, you can also rely on geopandas creating it: In [1]: import shapely.geometry In [2]: import geopandas In [3]: shapely_polygon = shapely.geometry.Polygon([(0, 0), (0, 1), (1, 0)]) In [4]: geopandas.GeoSeries([shapely_polygon]).__geo_interface__ Out[4]: {‘bbox’: (0.0, 0.0, 1.0, 1.0), ‘features’: [{‘bbox’: (0.0, 0.0, 1.0, 1.0), ‘geometry’: {‘coordinates’: (((0.0, 0.0), (0.0, … Read more

How/Where do I get geoJSON data for states, provinces, and administrative regions of non-US countries? [closed]

This process is now simplified (July 2014) compared to the steps I see in the accepted answer. It now seems much easier to get this data. I at first floundered around the web hoping I could just download a bunch of standard maps in GeoJSON format, but came up empty other than standard US/Canada offerings. … Read more

Difference between GeoJSON and TopoJSON

If you care about file size or topology, then use TopoJSON. If you don’t care about either, then use GeoJSON for simplicity’s sake. The primary advantage of TopoJSON is size. By eliminating redundancy and using a more efficent fixed-precision integer encoding of coordinates, TopoJSON files are often an order of magnitude smaller than GeoJSON files. … Read more