GeoJSON is a geospatial data interchange format based on JavaScript Object Notation (JSON)

learn more… | top users | synonyms

3
votes
2answers
429 views

How to determine number of features in GeoJSON file using Python or JavaScript?

Is there a best way to determine the number of features in a GeoJSON file? Ideally using Python or JavaScript.
3
votes
2answers
126 views

Is GeoJSON an OGC format

I am using geometries in a JavaScript page and it is best to use JSON objects rather than GML which is XML based. I heard of GeoJSON, but is it an OGC open format?
3
votes
3answers
504 views

FME and elasticsearch

We are developing a system to disseminate information about roadkills. The source data comes from three different databases. We have set up a FME project which pulls geojson from the source databases, ...
3
votes
3answers
215 views

GeoJSON Rendering in Leaflet

I have published a wms using the QGIS Cloud and on top of it I am overlaying the same data (countries of Europe), using GeoJSON. Have a look at an example here: http://jsfiddle.net/j21kh7ao/ At a low ...
3
votes
1answer
3k views

Converting JSON to GeoJSON or CSV?

How do you convert a JSON file to a GeoJSON file or csv. I have a JSON file with lat lon information, but how can I can convert this file to GeoJSON or csv. I have found some online tools to convert ...
3
votes
2answers
730 views

Remove unneeded columns from geographic data file?

I have some GML data that has some unneeded columns in it. I'd like to remove these columns in order to reduce the file size. (To clarify: I mean that the file has many points in it, and each of these ...
3
votes
2answers
3k 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 ...
3
votes
1answer
473 views

Accessing geojson properties using OpenLayers3

Is it possible to access geojson properties using the OpenLayers library? I tried to search for it but couldn't find any proper answer. According to my research, the library converts each geojson ...
3
votes
1answer
3k 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 ...
3
votes
3answers
844 views

Is it possible to check incoming GeoJSON to see if any of the features are identical to existing ones before adding to map?

I am working on a Rails/PostGIS app and doing a typical ajax call to retrieve GeoJSON within the map viewport bounds. Whenever the map is shifted or zoomed all of the markers are removed and then ...
3
votes
2answers
45 views

Ogr2ogr is rounding numeric field from PostgreSQL to 6 decimals

I am using ogr2ogr to convert the data from PostgreSQL to GeoJSON. PostgreSQL contains field named shape.area, type numeric, which stores values up to 17 decimal places, like 0.15627328781960101. The ...
3
votes
2answers
1k views

GeoJSON formatting for Leaflet

I am using http://GeoJSON.io as the source for my data, which is then to be displayed via Leaflet.js. I found that leaflet neads the file to include "var name = {" but GeoJSON.io doesn't like it, ...
3
votes
3answers
1k views

Definitions and limitations of MapInfo TAB file objects

I am working on a MapInfo plugin to convert MapInfo files to GeoJSON files. I am having trouble matching up the object types of the two formats. Each GeoJSON object type is described in the ...
3
votes
1answer
284 views

D3 javascript and GeoJSON: lines in Stockholm map very strange

All the code and shapefiles that I'm using are available in this GitHub repo. I'm trying to draw a map of Stockholm with D3. The shapefile looks ok in QGIS: However, drawing the GeoJSON produces ...
3
votes
1answer
367 views

cannot convert shapefile into GeoJSON

I have downloaded a shapefile of Stockholm (files on GitHub). I'm trying to convert the shapefiles to GeoJSON with the ogr2ogr command line tool. It does not work with the following error: Export ...
3
votes
1answer
133 views

How do I produce a GeoJSON with 1 point at a certain lon/lat?

I need to create a GeoJSON string, which contains exactly one point at lon/lat 132.159633, 43.350116. I'm trying to use GeoTools 12-RC1 for that. Let's say I have following method, which is supposed ...
3
votes
2answers
555 views

Error inserting GeoJSON in PostGIS

I know there is a similar question but I am getting a different error and none of those answers have helped. I am trying the following query (the GeoJSON itself is from the PostGIS website. INSERT ...
3
votes
1answer
652 views

Serialize python list containing geometry

In simple case if list doesn't contains geometry all works fine: result = [dict(f.fields, id=f.id, label=f.label) for f in features] json.dumps(result) But if result list contains geometry ...
3
votes
1answer
1k views

Converting wkt to geojson with OpenLayers

I am trying to convert wkt to geojson wiht OpenLayers. I wrote my code based on this question (geojson to wkt). That's what I have so far, but it is not working. Any ideas? var = ...
3
votes
1answer
2k views

My GeoJson will not display on a Vector Layer in Openlayers

I have geoJson from the the USGS that I am downloading to my server. It validates just fine with geojsonlint. When I past the JSON into this Openlayers example it says it is bad input json. My Code ...
3
votes
1answer
3k 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 ...
3
votes
1answer
767 views

What is generally faster in OpenLayers: WMS or GeoJSON?

I work both with WMS (connection with postgres) and GeoJSON in OpenLayers. I have the impression that a WMS is faster when more feature need to be loaded. And I have the impression that GeoJSON is ...
3
votes
2answers
2k views

Getting json feature id on OpenLayers

I'm projecting some features using json format on OpenLayers. I need to get the id from the feature (not the OpenLayers' id but the one in the json file). The file looks something like this. ...
3
votes
1answer
104 views

Leaflet pop-up does not work with Geojson data

I have a geojson file(Polygons).I want to display it on a leaflet map and when user clicks on a polygon, a popup with an information should be visible. The information is 'type'. I am able to see the ...
3
votes
1answer
80 views

Help with manipulating JSON to geoJSON

So i"m basically getting this JSON returned from a REST call (I'm using Python). [ { "ipAddress": "X.X.X.X", "score": "1000", } ] I want to convert this to geoJSON so I can plot the ...
3
votes
2answers
161 views

Recommended utility for editing of GEOJSON files

I have a geojson file with the boundaries and some very basic statistics (population) for all the counties in US. States are enumerated (1,2,...), not named. I also have a csv file with a ...
3
votes
1answer
57 views

Geojson in postgis Geometry : Z dimension error

i had this php code : ...
3
votes
1answer
267 views

geopandas: can't save geojson

My task is to upload geojson, add data from corresponding csv, drop some columns, then save it back to geojson. However, after I did everything, added csv data (gj.join(df) ), etc, I can't save it ...
3
votes
2answers
788 views

Read (GEO)JSON file from web service using FME Desktop

I have a webmap of bike stations and there is a json service for these stations behind the map. It is possible to provide this URL as the source dataset, using FME Desktop? Does FME Desktop support ...
3
votes
1answer
338 views

Put LeafletJS geoJSON's into a MySQL database through PHP

I'm doing a project that will let users manipulate a map through LeafletJS, creating circles and polygons on top of the map. I need to gather these inputs for later analysis, using a MySQL database ...
3
votes
1answer
172 views

ogr2gui geojson to csv do not export coordinates

I tried to convert ogr2gui to convert geojson files to csv. The geojson file contains point data only. The resulting csv only contains attribute data, no coordinates. Is there a way to get the ...
3
votes
1answer
4k views

How do I set the fillcolor of polygons in Leaflet.js dynamically?

I'm using the interactive chloropath example for leaflet.js I figured out how to make each of my polygons add a running tally of values to the bottom of the page after each polygon is clicked. Upon ...
3
votes
1answer
943 views

How to control the order of appearance of markers using leaflet?

I'm plotting out markers from GeoJSON files onto my Leaflet map. Some of these markers overlap so now I want to control the order of appearance of these markers so that one type always sits above the ...
3
votes
2answers
757 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 ...
3
votes
1answer
3k views

OpenLayers & GeoJSON files

After some hunting, it seems that if I have an a geojson file, I NEED the data and map to be on a server in order to view this in OpenLayers because of the protocol class. I saw an example where I can ...
3
votes
1answer
1k 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, ...
3
votes
1answer
34 views

What is the difference between using a PolyLine layer and a GeoJSON layer in leaflet?

This question arises because on my project I will have a backend that consists of gpx tracks. Then, my frontend queries it (based on time, location filters, etc.) and I will either get the ...
3
votes
2answers
42 views

Conversion of .shp to EPSG:4326 has slight offset

I just started this project where I need to project the Dutch municipalities on a map. Luckily this seems very easy with the help of GeoJSON. However, I'm having a slight issue where my conversion to ...
3
votes
3answers
56 views

Projection offset between layers: OSM, GeoJSON

Don't know why there is an offset: The coordinates of the points that appear on the example were gotten through google's geocoder from some Rosario, Argentina directions. I have checked the lats and ...
3
votes
1answer
220 views

Is there a way to reduce tile processing from Openlayers 3 when user pan & zoom a lot?

I have 2 overlays with local tiles (xyz) on my map. When the user zoom in / out and pan the map intentionally a lot, the app becomes very slow because OL tries to render all the tiles it was requested ...
3
votes
1answer
111 views

ST_GeomFromGeoJSON strips coordinates, is it a bug?

I'm storing some geo paths in PostGIS using GeoJSON and the ST_GeomFromGeoJSON()-function but I just found an issue with it: SELECT ...
3
votes
1answer
324 views

Lambert_Conformal_Conic: converting from shapefile to geojson fails

I have a shapefile that also contains a proj file that looks like so: PROJCS [ "MGI_Austria_Lambert", GEOGCS [ "GCS_MGI", DATUM [ "D_MGI", ...
3
votes
2answers
232 views

Performance loss for OpenLayers EPSG transformation? Storing GeoJSON coordinates in lat/lon or in native map projection?

For a project the map projection is EPSG:32468 (tiles). On top of the map, two or three GeoJSON LineStrings should be displayed using OpenLayers. Each LineString has about 1500 coordinates. ...
3
votes
1answer
866 views

Change Layer name when converting from GeoJSON

I am converting GeoJSON files to other formats (including KML) using ogr2ogr. As you may know, there is no field in a GeoJSON file to specify the name of the layer, causing every conversion to have ...
3
votes
3answers
175 views

OpenLayers3 and GeoJSON data with null features

I am new to OpenLayers and I'm trying to label features on a map using a GeoJSON data. Here is my code: var layer = new ol.layer.VectorTile({ source: new ol.source.VectorTile({ format: ...
3
votes
1answer
121 views

PostGIS convert point->raster->GeoJSON

My question is a follow up to Convert a raster to GeoJSON polygons in PostGIS. I'm trying to accomplish querying point data from the database, and then turn that into a raster for calculating ...
3
votes
1answer
87 views

GeoSpatial queries and indexes in memory

I am currently using Spark/Scala to process some data, and I am at the point that I need to run ~3M of geospatial queries. One common solution would be using MongoDB or PostGIS (or Magellan for Spark ...
3
votes
1answer
64 views

Leaflet geojson styling leaves gaps between polygon

I'm styling a geojson polygon composed of multiple closely placed vertical segements which doesnot have a gap in between (i've checked the topology). I want to display just the fill and without ...
3
votes
1answer
115 views

Leaflet + GeoJson = problem with style

I got my first leaflet + geojson project partly working! (even the popup with content from the geojson file!) but I still have a problem with style the geojson (export from mapbox) file has point, ...
3
votes
1answer
140 views

Troubleshooting with Tiger for d3 — is this the wrong projection? Why's it look like this?

UPDATE: Solved, sort of … I downloaded the file afresh and tried feeding it through ogr2ogr and topojson again … and wouldn't you know … after a while it worked. I think I was possibly not setting an ...