An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

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.
19
votes
3answers
6k views

How to store lines and polygons in JSON documents?

Looking at the increasing NoSQL movement and considering that databases like MongoDB offers a new perspective in flexible data storage for GIS. What is the best way to store lines and polygons in ...
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
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 ...
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 ...
13
votes
2answers
6k views

ogr2ogr converting to shapefile - how to select feature types?

Shapefiles can only have one geometry type, but many other formats (kml, geojson) can have multiple types. When converting to shapefiles, is it possible to to tell ogr2ogr to create multiple ...
11
votes
5answers
3k views

How do you convert OSM XML to geojson?

I want to take the XML output of a Xapi query and display it using leaflet or polymaps. How can I do that? Is there an easy way to convert XML to geojson
11
votes
1answer
804 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?
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 ...
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 ...
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 ...
10
votes
3answers
6k views

How to create a GeoJSON that works with D3?

I'm simply trying to convert a .shp file to a geoJSON format using: ogr2ogr -f geoJSON output.json input.shp After executing the command nothing seems to be wrong. Here's an excerpt from the ...
10
votes
4answers
1k views

Alternatives to ogr2ogr for loading large GeoJson file(s) to PostGIS

I have a 7GB GeoJson file that I would like to load into a PostGIS database. I have tried using ogr2ogr but it fails because the file is too big for ogr2ogr to load into memory and then process. ...
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
2k views

polymaps & poly… polygons

I've been playing with Bing Maps + Polymaps recently. It has become apparent that Bing is the only mapping resource available to Polymaps that includes satellite imagery. Is this true? I am trying ...
10
votes
2answers
4k views

How do dissolve polygons from shapefile using open source tools?

In my current project I'm visualizing data on a map representing some values for each administrative areas of a country. I'm given a shapefile of this country, which I'm converting to GeoJSON for use ...
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 ...
9
votes
4answers
2k views

GeoJSON too bulky - what to do?

I am using leaflet.js to allow web users to select a region. Valid regions are US states, Canadian providences, and world countries (except for US and Canada). I constructed a shapefile myself using ...
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 ...
9
votes
6answers
3k views

Is there an existing library for converting ArcGIS Features to Json?

Is there an existing library for converting ArcGIS IFeature types to and from Json/GeoJson?
9
votes
5answers
2k views

GML, KML, GeoJSON - Speed rendering 3109 polygons?

I am working with Geoserver, serving U.S. Lower 48 counties to openlayers (3109 polygons - lots more vertices). The counties are loaded into a postgis database. I am curious about developer ...
9
votes
4answers
3k views

Trying to find a .NET GeoJSON library

I'm trying to find a .NET GeoJSON library which I can use to export my SqlServer2008 spatial boundaries (in binary format -> eg. STAsBinary()) from my .NET code to my HTML frontend to display on a ...
9
votes
1answer
2k views

Setting up TileStache

I want to set up TileStache, but I'm new enough to the world of GIS to find the TileStache docs a bit impenetrable. I've just about figured out that I need to run tilestache-server.py -c ...
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 ( { ...
8
votes
2answers
1k views

How to reduce the file size of GeoJSON data?

For my project I am trying to convert the tiger shapefile information for us states into GeoJSON format However when I use the ogr2ogr tool the data file is about 20 MB. I have seen the geoJSON file ...
8
votes
2answers
932 views

Future for geospatial on App Engine?

2 years ago, this question was posted here at Gillies's blog, on date of 2009-05-15. Future for geospatial on App Engine? At that time there was no news relating to any apps of GIS web services ...
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 = ...
8
votes
3answers
220 views

Metadata and GeoJSON?

My agency currently maintains and distributes shapefiles with FGDC XML metadata. We have now converted a lot of shapes to GeoJSON but are concerned that if our developers forget where they got the ...
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 ...
7
votes
4answers
7k views

Source for GeoJSON data for the US

Does anyone know of any good sources for US data (counties, congressional districts, etc) in GeoJSON format? Has anyone converted public-domain shapefiles/sources to GeoJSON that they would be willing ...
7
votes
2answers
1k views

Converting KML files for use with Python library Shapely

I am trying to get a KML-file (wijken.kml) into Shapely. The KML-file is validated against the proper XML schema, so I guess the input is correct. Routes I have tried: 1) Converting to WKT or WKB ...
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+ ...
7
votes
1answer
4k views

What is the default projection in Leaflet?

I've read an API documentation for Leaflet on its site, but I can't realize: what is a default projection to view maps? It was written about spherical and elliptical Mercator and Equirectangular - so ...
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 ...
6
votes
3answers
889 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 ...
6
votes
2answers
1k views

Converting MapInfo TAB to GeoJSON

Is there an easy way to convert MapInfo TAB files into GeoJSON? I am working on a web-based mapping system which will use GeoJSON to transfer data. I also use MapInfo and would like to be able to ...
6
votes
3answers
422 views

What is the intended Behavior of -skipfailures in ogr2ogr?

I am trying to run ogr2ogr to convert some geojson to shapefile. All is good until any of the geojson features have an invalid geometry (for example, the coordinate array of point geometry is empty). ...
6
votes
1answer
168 views

Representing a TIN in GeoJSON

Regarding the GeoJSON representation of a TIN, are there any specifications or existing implementations I may not be aware of? You could probably hack one together using the multipolygon ...
6
votes
2answers
885 views

Generating GeoJSON tiles from GeoDjango - basic overview?

I'm working with the glorious PolyMaps and I want to build a map similar to the population example. I understand that this needs GeoJSON tiles. I have a GeoDjango database, with a bunch of County ...
6
votes
2answers
110 views

Can QGIS give GeoJSON layers a meaningful default name?

When I add a GeoJSON layer to my QGIS project, it always gets the name OGRGeoJSON. This is in contrast with shapefile layers, which seem to be named after the file name by default. Is there a way to ...
6
votes
4answers
275 views

How to use Leaflet to efficiently show parts of a massive dataset?

I keep seeing non-GIS web developers running into this problem, and I'm not sure what the solution is. There is some dataset of thousands of items. We want to show a map to the user, with the ...
6
votes
1answer
133 views

Suitable algorithms for simplifying isochrone polygons

I'm looking for an algorithm for simplifying isochrones which were generated using OSM data. These are generally characterised as having lots of small "holes" mostly due to missing OSM data but also ...
6
votes
3answers
349 views

How to generate image tiles from custom geo data for use with Leaflet

Migrating a webapp from Google Maps API V3 to OSM + Leaflet, which displays custom data that consists of lots of lines and points, on a background map. When this custom data is drawn by Leaflet on ...
6
votes
2answers
519 views

Generate tiles for google maps overlays

I am trying to show some information on Google Maps which would be in the form of translucent circle overlays. The problem is that some circles overlap, which results in increased opacity and blending ...
6
votes
1answer
201 views

How do I represent the whole Earth as a Polygon?

This is related to determining the interior of a Polygon. My difficulty is that if I specify a Polygon covering the Earth going from East to West, it will still have a boundary along the ...
5
votes
3answers
458 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.
5
votes
3answers
1k views

How to convert geoJSON to python objects?

New to the site, and to geoJSON, and to python. My goal is to read in a file with geoJSON data, and use it to generate shapes to be used in an application that is using python scripting. Python has ...
5
votes
3answers
304 views

Is there a API which return the geojson data for a countries borders?

Is there a simple free REST API where I can send the name or code of a country and get in return geojson data which highlights it's borders ? I'm writing an application where I will have a changing ...
5
votes
3answers
1k views

Interacting between Openlayers and Python

I have a openlayers website like this one that gives the user the ability to draw polygons and then creates a GeoJSON file. I want to process this GeoJSON with a python script. The python script ...
5
votes
1answer
192 views

Conventions for returning GeoJSON via an API

I have a queryable API that returns one or more GeoJSON FeatureCollections. Currently the response looks something like this: { "success": { "data": { "layer1": {"type": ...