An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

1
vote
1answer
68 views

JSONP working with Geoserver and OpenLayers

I'm in this scenario (fighting with the same origin police issue): I have a map initialized with OpenLayers and a WFS request trough the Protocol.Script object that is giving me this error: ...
0
votes
1answer
49 views

Why are some OSM GPX line string endpoints connected?

I am working with GPX files from OpenStreetMap to render the public transportation lines of Berlin. I converted them to GeoJSON using the togeojson script. For some reason some of the lines are ...
4
votes
1answer
96 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 ...
2
votes
0answers
72 views

How to add an offset to a GeoJSON layer in Leaflet?

Using the example GeoJSON tutorial code at leafletjs.com. Change the myLines variable so that the two lines overlap, but run in opposite directions as follows: var myLines = [{ "type": ...
1
vote
2answers
49 views

Problem - ST_AsGeoJSON return text with accolade

I am saving a result of ST_AsGeoJSON(..) into csv file. But the results I got can't be interrupted as an object later on. How can I polish and delete the accolades that I don't need. ...
0
votes
0answers
22 views

How to realize two overlaying layers? One with Popups, the other one with Info-div!

I'm trying to display two overlaying layers (geojson). Layer1 should give me information by hovering over it (works fine based on the Leaflet Choropleth Map Example. Layer2 is situated within Layer1 ...
0
votes
0answers
123 views

Leaflet and Geoserver WFS

I have problem with Leaflet...i tried to connect Leaflet with Geoserver WFS, but in console i have error: SyntaxError: missing ; before statement ...
2
votes
3answers
79 views

How to prepare a multi-colored vector layer?

I need to present a multi-colored vector layer and something similar to below: I need to prepare the vector layer by making use with the data set available in my database. Inside my database, I ...
0
votes
1answer
131 views

External geojson not showing in OpenLayers

I'm new to OpenLayers. I tried some recipes found here to load an external geojson file as an overlay on a map I'm creating and it's not working. The map is loading as well as my base layer, but no ...
2
votes
3answers
84 views

How to get a bbox selection of huge shapefile as GeoJSON?

I have a 4.29 GB Shapefile from which I want to extract features as GeoJSON, defined by a bounding box. This should be as fast as possible, because I want to use it in a web application. My first ...
0
votes
0answers
20 views

From NBM to UWN

Okay, I'll start this off by saying that I'm not a GIS expert by any means. I'm also working with data and places that most people don't work with, but I'm hoping it can be boiled down to basics. I've ...
1
vote
1answer
45 views

How to limit decimal digit of GeoJSON

I am using postGIS. I am using ST_AsGeoJSON(geom) function to get GeoJSON data of Geom field. Its returning a long lat value that have 13 digits after decimal point. Is there any way to reduce or ...
0
votes
0answers
320 views

D3.js with dynamic geojson data (SQL server/.NET)

I have a $.ajax function which returns the geojson data from the asp.net mvc server method. I want to know how I could send that as a parameter to d3.json() function. Better if anyone shared code ...
1
vote
0answers
67 views

Folium GeoJSON Overlay Not Appearing

I am in the midst of a task which involves the clustering of assessment neighborhoods into larger neighborhoods (data link). The goal is build these neighborhoods in a manner consistent with major ...
3
votes
1answer
80 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 ...
0
votes
0answers
148 views

D3.js with dynamic geojson data

I have a $.ajax function which returns the geojson data from the asp.net mvc server method. I want to know how I could send that as a parameter to d3.json() function. Better if anyone shared code ...
3
votes
1answer
94 views

Why is the exterior shell of this GeoJSON invalid?

I got some data from Zillow's neighborhood database as shapefiles and converted them to GeoJSON. However, some of the objects appear to be malformed when inserting them into MongoDb. Is there ...
0
votes
0answers
21 views

loading geojson into qgis, '…' is added to the end of each string

I am importing a geojson file into qgis. a snippet of the geojson looks like this: "properties": { "poEs": [ 8.2248394077e-08, ...
0
votes
1answer
90 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 ...
0
votes
1answer
213 views

Convert GeoJSON form EPSG 3857 to 4326 with JavaScript [duplicate]

Given a GeoJSON in EPSG3857: { "type": "Feature", "properties": {}, "geometry": { "type": "LineString", "coordinates": [ [ -13720479.997764934, 5688254.733325758 ...
1
vote
1answer
204 views

Converting wkt to geojson with OpenLayers

I am trying to convert wkt to geojson wit 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 = ...
1
vote
1answer
129 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 ...
0
votes
1answer
32 views

Make hangs when attempting to build zip code TopJSON file on Mac OS X

Thanks so much to all involved with the us-atlas project. I am learning how to use d3, leaflet and other tools to make maps and this is really helpful. I have grabbed files from the us-atlas project ...
0
votes
0answers
155 views

Using Tile Mill and GeoJSON

I am trying to use Tile Mill and GeoJSON layers to have an image appear within a tooltip but it is not working properly. The process I go through to get the GeoJSON: 1) load .shp into QGIS 2) save ...
0
votes
3answers
114 views

Postgis ST_AsGeoJSON() to openlayers security issues?

Im about to implement a python script serving my openlayers code with GeoJson data from PostGIS. However, here How to connect OpenLayers to PostGIS data? I see " Unfortunately you cannot connect a web ...
1
vote
1answer
50 views

Hot could I generate a CRS field inside the GeoJSON object created by Leaflet layer.toGeoJSON?

I'm using Leaflet to transform some drawn polygons to GeoJSON and send them to a backend. But the GeoJSON objects generated by layer.toGeoJSON are like this: { "type":"Feature", "properties":{}, ...
1
vote
2answers
86 views

json to xml transformation with x2js

I am trying to transform a JSON object to XML, but i have somehow get stuck in jscript (not an expert). Here is the code: ... var GEOJSON_PARSER = new OpenLayers.Format.GeoJSON(); var ...
0
votes
2answers
47 views

geojson from st_dwithin query

Im trying to query all the objects within 100m and I want the result to be in geojson format not list of geojson. Im using PostgreSQL 9.1, PostGIS 2.0. Tried this query: SELECT ...
3
votes
1answer
255 views

Offline Phonegap/Openlayers App

I have a mobile app that uses Phonegap with OpenLayers and Geoserver. Now, I need to make the app available completely offline. The amount of data points can get very large depending on what client is ...
0
votes
1answer
143 views

Is there a typescript interface for “GeoXML” formats (such as WFS and WMS) apart from GeoJSON?

I want to work with JSON behind TypeScript interfaces but I'm not sure what the spec should be outside of GeoJSON. Is there a spec which is more encompassing then GeoJSON and includes things like a ...
2
votes
0answers
481 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 ...
0
votes
1answer
321 views

Leaflet GeoJSON features not showing up in map

New to GeoServer and Leaflet...loving it so far, but I am weak in JavaScript. I have just built a simple web page that should load points from a GeoServer WFS service using GeoJson. However, even ...
2
votes
0answers
204 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 ...
0
votes
2answers
184 views

How to convert gml to geojson using Python and ogr with geometry transformation?

Does anyone have an idea how to convert gml to geojson (with attributes) using Python with ogr bindings? It should be possible to transform geometries to different coordinate system. I can not use ...
4
votes
3answers
330 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 ...
0
votes
1answer
193 views

Search for geojson polygon in mongodb implementing a custom vector tileserver

I am building a vector tileserver in node.js using mongo 2.4.7 as database. My database contains geojson data from multiple sources and they are in many layers. It is important to render the layers ...
0
votes
0answers
26 views

Find area that it's in one GeoJSON file but not the other

I have two GeoJSON files, A and B. The features in A contain everything in B, and more (they're contour lines, and A is a lower elevation). How can I get the difference between the two files? As ...
0
votes
1answer
133 views

Why do Shapefiles and GeoJSON behave differently in GDAL Python?

I have a test.shp. I loop over the file, buffer the features, and write the buffers to a new file. I tested writing the buffers to a Shapefile and to a GeoJSON. If I try to use the new buffer layer ...
5
votes
1answer
165 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+ ...
0
votes
2answers
404 views

How to get WKT or GEOJson by country or city name with Overpass API?

I'm trying to understand Overpass API, I'm experimenting with it, but cannot get what I expect. Overpass API doesn't return me neither polygon shapes, nor WKT, nor GEOJson, nor even a highlight of the ...
3
votes
2answers
211 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, ...
0
votes
0answers
156 views

Leaflet - How to display all stacked marker information on a single mouse click

I am using leaflet to view layers from GeoServer. There is a WMS basemap layer and WFS feature layer returning GeoJSON data. When I click on a Marker I use jQuery as the popup. If I click on a stacked ...
3
votes
2answers
171 views

How to generate one geojson file from several rows in Postgres/PostGIS?

I have a table with geospatial objects, in particular, polygons. I know that I can generate from one row a geoJSON string using ST_AsGeoJSON(http://www.postgis.org/docs/ST_AsGeoJSON.html). But I would ...
1
vote
2answers
542 views

How to project pixel coordinates in leaflet?

I am trying to create a map based on an image which is 16384x16384 px, but I would also like to add markers at specific locations using pixel coordinates of this given image. I created a tile layer, ...
1
vote
1answer
1k views

setStyle() function for GeoJSON features - Leaflet

Ok, since I already asked a very long question about this, but since it didn't get any new replies for a while, and not to get confused in details, I will keep this one simple the best way I can. If ...
0
votes
2answers
404 views

How do I modify features during runtime, in a GeoJSON feature group on Leaflet?

I have added some GeoJSON to my Leaflet powered map as below. (Altered version) var array_of_layers = L.layerGroup([]); var styleholder = []; var belgium_style = {color: "#d3e46f"}; var bosnia_style ...
1
vote
1answer
86 views

How Do I configure PostGIS 2.0 on windows to use ST_GeomFromGeoJSON?

I have installed PostGIS 2.0 on a Postgres 9.1 database on a Windows 2012 Server. I need to write an insert query, which uses ST_GeomFromGeoJSON(). The Docs for this query say that I need - JSON-C >= ...
3
votes
1answer
1k 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
161 views

Extracting Earthquake Depth from the USGS GeoJson Earthquake Feed for use with Openlayers

I have some GeoJson from the USGS as follows: {"type":"Feature","properties":{"mag":4.3,"place":"30km ESE of Jarm, ...
3
votes
1answer
407 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 ...