An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

14
votes
9answers
9k views

How to convert ArcGIS Server JSON to GeoJSON?

I'm creating a web map using Leaflet, and I want to be able to grab feature layers from our ArcServer. I have successfully been able to retrieve a feature class as JSON, but Esri's JSON objects don't ...
13
votes
3answers
4k views

Converting SimpleGeo Places GeoJSON file to shapefile?

SimpleGeo has recently made their "Places" data set freely available which is GREAT, because now we can use it for our own purposes, even offline. So I went about downloading the 2GB dataset, which ...
22
votes
1answer
4k views

Convert GeoJSON to TopoJSON

Question How do you convert GeoJSON data to TopoJSON? Why Topojson files are often smaller than geojson and the conversion allows you to incrementally simplify a dataset, if you wish.
8
votes
1answer
1k views

arcpy.geometry __geo_interface__ and AsShape() function: loss of precision and holes

I'm serializing my arcpy geometries as geojson so that I can 'hydrate' them back as geometries later and I'm having 2 problems in the cycle.: PROBLEM 1: Precision R0 = ...
13
votes
4answers
5k views

Create Vector Tiles for Polymaps

Ok, likely my bad for not making it to WhereCamp5280 and asking the FortiusOne geeks directly, but what's the process for creating GeoJSON 'tiles' for use in Polymaps? The Population example over at ...
10
votes
1answer
3k views

How to display geoJSON from an URL in a layer?

I am looking for some type of plugin or code which would allow me to add a geojson URL, define the areas to input the lat/long variables from the visible Qgis canvas map and call/render the results ...
7
votes
2answers
3k views

Generating GeoJSON with Python

Hi I want to programatically create a GeoJSON file using polygons from a shapefile but adding attributes from my own application. This is easily done for a shapefile: def ...
3
votes
1answer
5k views

How do I get GeoJSON data from GeoServer into show up on my Leaflet map?

I'm trying to create a simple "Green" map for my city. The idea being that it is a website with a map and layers you can turn on and off. I am serving the data through GeoServer and am using GeoJOSN ...
4
votes
1answer
2k views

leaflet geojson coordinate problem

I just started to play with leflet/geojson a little. But my coordinates are not rendered properly and I have no clue what is going on. My coordinates are: 52.23943, 4.97599. They work correct with ...
11
votes
3answers
4k views

GeoJSON Styling information

As far as I can see there is nothing in the GeoJSON standard to store styling information, i.e. line colours, thicknesses etc. Am I missing something or is this just something that GeoJSON doesn't ...
8
votes
3answers
4k views

How to insert a GeoJSON polygon into a PostGIS table?

I need to insert a polygon from GeoJSON to my PostGIS table. This is how the SQL query looks like. INSERT INTO tablename (name, polygon) VALUES ( 'Name', ST_GeomFromGeoJSON ( { ...
10
votes
1answer
2k views

GeoJson to ESRI Shapefile using ogr2ogr

I have a GeoJson file that I want to convert to ESRI Shapefile using ogr2ogr in FWTools. I tried using ogr2ogr -F "ESRI Shapefile" filename.shp geojsonfile.json OGRGeoJSON I got output ERROR ...
3
votes
1answer
3k views

Parsing a GeoJSON file with jQuery

I'm trying to iterate through a GeoJSON file (below) and eventually populate an array with a few attributes within "properties". I keep coming up short working through various examples I can find. Do ...
4
votes
2answers
1k views

GeoJSON/GeoCouch questions from a newb [duplicate]

I am new to JSON and GeoJSON and would like to start to use this but I am a little confused about some things. Perhaps you can help me out: 1) Is there a GeoJSON validator out there? 2) Is the text ...
1
vote
1answer
1k views

How to get correct format of coordinates for export to geojson from QGIS?

I've created a custom map in QGIS with a few shapefiles. I'm using leaflet.js to render the map and the shapefile points and everything lines up correctly. The CRS is set to 4326. When I export the ...
1
vote
1answer
2k views

How can I add an infowindow to an OpenLayers GeoJSON layer?

In my OpenLayers script I refer to an geojson layer. Is it possible to add an info window?If yes, how can I create this. Script is as follows: var lon = 5, lat = 52, zoom = 7, epsg4326 = ...
7
votes
1answer
253 views

Python3 libraries for GIS analysis

I am trying to do some spatial data analysis in Python 3 now, and I was wondering what the best libraries are for GIS in Python 3. The Fiona library was developed with Python 3.3 but the Python 3+ ...
3
votes
1answer
108 views

Day and night zone layer for Leaflet

I'm working with Leaflet and I'd like to show the day and night zones adding a dynamic layer to my map. I was thinking to add a static layer with some transparency and make it move every x minutes but ...
2
votes
4answers
4k views

How to convert SHP into GPX or JSON?

I would like to convert the tree inventory shape files of London (Canada) into a GPX file and if possible into a JSON file. You can download the archive from their Open Data website. It contains the ...
0
votes
1answer
292 views

Reproject GeoJSON from EPSG:3857 to EPSG:4326

I am using this reproject tool to convert a GeoJSON point from EPSG:3857 to EPSG:4326. My command fails. What am I doing wrong? $ echo ...
11
votes
1answer
805 views

What is topojson and how is it different than geojson?

This is a conceptual question. What are the differences between these? and what are the pros and cons of these formats?
6
votes
4answers
7k views

How to load external geojson file into leaflet map

I would like to load a geoJSON (polygon) file into my leaflet map. I have seen examples where geoJSON is embedded into the javascript code but I can't find any examples showing how it is done with an ...
5
votes
1answer
3k views

problem adding pop-up to GeoJSON layer in Leaflet

I'm new to working with the Leaflet API and am running into trouble with creating popups for a GeoJSON layer. I've looked at the following post as a reference and am still having difficulty: binding ...
3
votes
3answers
1k views

How to add a polygon from PostGIS ST_AsGeoJSON into Leaflet?

I try to use the following function to add polygons to my Leaflet map. function polygon(geojson) { alert(geojson); // alert for testing layer = L.geoJson(geojson); layer.addTo(map); } ...
10
votes
1answer
5k views

Open a GeoJSON file with QGis

If I have a GEOJson file, for example a file named test.js with inside the following: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type": "Point", "coordinates": ...
10
votes
2answers
3k views

How to Export Feature GeoJSON from PostGIS

I'd like to do a GeoJSON dump of a PostGIS table, but I want to export features (the geometry and the properties) not just the geometry. I've been digging into the ST_AsGeoJSON function but it looks ...
9
votes
3answers
3k views

How to Validate a GeoJSON

I have a small script that I'm using to generate GeoJSON data from a data format not currently supported by GIS software. I would like to validate the output, but when I use ogr2ogr to read it, it ...
6
votes
3answers
894 views

Advantages of WFS over GeoJSON/KML?

I'm planning to create an online map with openlayers (2 or 3) or leaflet. I have to show some points/markers (~30.000), polygons (~500) and lines on top of an OSM map in several layers. Those points ...
3
votes
1answer
950 views

OpenLayers GeoJSON Data Store

Background: I have a single geoJSON data object that backs multiple Vector Layers of its features. I do this because the feature data has many attributes and can be presented in many different ways, ...
1
vote
1answer
77 views

Geopandas/folium map not displaying

Good afternoon, I'm trying to use a combination of geopandas, pandas and folium to create a polygon map that I can embed incorporate into a web page. For some reason, it's not displaying and wonder ...
1
vote
1answer
1k views

Which plugin can draw topoJson right within Leaflet without conversion?

I already have asked how to reduce file size and increase performance for publishing spatial data on the web using Leaflet, here. A conversion to TopoJSON has reduced the file size by approximately ...
5
votes
2answers
753 views

OGR merge shapefiles of different geom type into a single GeoJSON feature collection

I'd like to merge shapefiles of different geometry types into a single geojson feature collection, but OGR says it doesn't support update of GeoJSON files: $ ogr2ogr -f GeoJSON -t_srs crs:84 -lco ...
4
votes
2answers
689 views

binding nested arrays as geojson popups in leaflet

I am struggling with geojson popups in leaflet.js I have nested arrays as properties for my features - an example would be counts of fish caught at a location (not my actual project data!) ...
2
votes
2answers
557 views

Leaflet.geojson webpage performance out of hand, how to convert to .png?

I exported some countries as a single .geojson file. The file includes every country's vertices and coordinates, as that's what a .geojson is ─ a vector file. Thing is, there are about 20 countries ...
1
vote
1answer
473 views

Reprojecting coordinates and geoJSON in leaflet

I have a Leaflet map in default projection and a wms layer also in default (web mercator) projection. I would like to add polylines and a geoJSON layer to my map, but the coordinates are in EPSG4326. ...
1
vote
1answer
3k views

Integrate GeoJSON file with openlayers.protocol.http

I've got a problem with (the title says it) integrating a geojson file in my openlayers map. I have to use the openlayers.protocol.http way. I examined lots of examples on the web (and on ...
0
votes
2answers
98 views

Convert shapely polygon coordinates

I am trying to work with a shapefile using shapely, fiona and python. The original coordinate system is in latitude and longitude that I am trying to convert to state plane system. So I want an ...
5
votes
3answers
459 views

Can we merge shapefiles with different geometries (point and polygon) to get a single layer which shows both geometries?

I want to merge two shape files in which one is of point geometry type and other is polygon type in order to get a single layer containing both points and polygon in a single map.
3
votes
5answers
525 views

How can I count overlapping polygons, resulting in a new set of polygons?

I have 100 polygons in a GeoJSON file that partially overlap each other. I would like to produce 100 new polygons as follows: The area covered by any of the original 100. This is their union. The ...
3
votes
2answers
2k views

Convert GML to GeoJSON

I have downloaded a GML file from Statistics Canada and would like to convert it into GeoJSON to use parts of it in a D3 visualization on the web. However, I did not find a converter that would do ...
2
votes
2answers
60 views

How to export thousands of features from PostGIS to a single GeoJSON file?

I know how to export one feature from a PostGIS database using ogr2ogr: $ogr2ogr -f GeoJSON out.json "PG:host=localhost dbname=xxx user=xxx password=xxx" -sql 'select id, county, wkb_geometry from ...
2
votes
0answers
821 views

Geoserver WFS get feature doesn't work - “SyntaxError: missing ; before statement”

I'm trying to use geoserver WFS json for creating vector layer (instead of using WMS) because this is a layer I redraw every 20 seconds. This is the code I use : function getJSON() { var ...
2
votes
2answers
246 views

animate polygons in series of kml/geojson/shp

I have a series of KML files (though they could easily be converted to geoJSON, SHP, or anything else that ogr2ogr can handle), each file containing a set of polygons that correspond to the alpha ...
2
votes
1answer
2k views

Conversion from Shapefile to TopoJSON format results in incorrect map when rendered using d3js

I am trying to build a map of Canada showing FSA boundaries using d3js. I got shape data from Statistics Canada ...
2
votes
2answers
687 views

How to Merge/Join GeoJSON and JSON?

I want OSM administrative boundaries from http://global.mapit.mysociety.org/area/14455.html. I can get the geodata in different formats there, but the attribute data always is a separate JSON file. I ...
2
votes
2answers
2k views

leaflet and geojson tiles

New to mapping. Trying to create a heat map with data that updates every hour for US Counties with leaflet.js similar to http://leaflet.cloudmade.com/examples/choropleth-example.html. But, adding ...
2
votes
2answers
513 views

how we create line between two cordinates on polymap?

I am working on d3 and polymaps, I plot map and create circle on the given latitude and longitude which retrieves from the JSON file but now I want to connect those circles with line. I tried to do it ...
1
vote
1answer
118 views

OpenLayers and GeoJSON

Recently I started learning Openlayers 2x and I've been struggling for a while now with a GeoJSON and it's projections. So, here is the deal; I successfully added wms layers from ( ...
1
vote
1answer
75 views

Convert Multipolygon Geojson to multiple geojson polygons?

I see a lot of questions going from Polygons to MultiPolygon, but is there some easy way to go the other way around? It would also be useful to preserve the attributes from the MultiPolygon to apply ...
1
vote
1answer
145 views

PostGIS convert GeoJSON to geography

While there are functions to convert geography to GeoJSON: text ST_AsGeoJSON(geography geog, integer maxdecimaldigits=15, integer options=0); I do not see any way to go the opposite direction ...