An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

1
vote
2answers
183 views

Printing possible for openlayers GeoJson WFS with Mapfish printing service and wkhtmltopdf?

I searched lots of places but I couldn't find proper examples or documentation to do printing using Mapfish Printing service or Wkhtmltopdf. My application has a few WFS layers from openlayers and ...
1
vote
1answer
95 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 ...
1
vote
1answer
202 views

GeoJSON vector layer created using OpenLayers is broken

What i want to do here is to create a vector layer (using openlayers) from a GeoServer JSON Response. Actually i'm doing this: var url = ...
0
votes
1answer
114 views

ogr2ogr GeoJSON GeometryCollection

All, I have a Postgres/PostGIS DB with two geometries in a single table. I want to export them as a GeoJSON GeometryCollection (see here) but I can't seem to get the GEOMETRY_AS_COLLECTION layer ...
1
vote
2answers
167 views

OpenLayers add a json layer to existing map on load

I am new to OpenLayers ... i have managed to build a layer with several features (draw tools, delete and save buttons). When the user draws shapes on the image map and press Save, these are stored ...
2
votes
2answers
136 views

Sending map extent in (geo)JSON

I have a leaflet map that I need to fitBound on a given rectangle. The coordinate for the fit bound will be transfered in JSON via a REST call on a server. We are using GEOJson to encode our geometry ...
2
votes
0answers
546 views

How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane?

I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in place in the leaflet-overlay-pane? (For example, how could ...
3
votes
2answers
324 views

Problem with loading GeoJSON file in OpenLayers generated by PHP

I'm trying to read some geo-data from PostGIS database using PHP, creating a GeoJSON file and showing it on a base map using OpenLayers. The PHP code works just fine. The generated data in GeoJSON ...
0
votes
0answers
204 views

Venue/Indoor Map using D3.js and Geojson

I have created geojson file which contains all the features of 1st floor of a shopping mall. I got that venue map projected using d3.js with different colors but only some parts not the complete map. ...
1
vote
1answer
733 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 ...
2
votes
1answer
452 views

Converting multilayer KML files to GeoJSON using ogr2ogr

I have a kml file that I'm trying to convert to GeoJSON. However, it turns out there's multiple layers, and ogr2ogr isn't happy. $ ogr2ogr -f GeoJSON shapes.json shapes.kml ERROR 6: GeoJSON driver ...
0
votes
0answers
285 views

Java + GMaps JSF + PostGis + JasonSanford / geojson-google-maps

Guys want to test how to plot lines and points in google maps using Java + JSF + PostGIS + GMaps JasonSanford / GeoJSON-google-maps. First have a spaceport in postgis with a table of rows and other ...
1
vote
1answer
64 views

When do GeoJSON feature collections need feature ids?

I've seen feature collections with feature ids for each feature. I've seen others with no featureid. When do you need it?
2
votes
1answer
174 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
1
vote
1answer
136 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
75 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 ...
6
votes
3answers
250 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
146 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
85 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
33 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 ...
1
vote
3answers
143 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
466 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
152 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
21 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
68 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
540 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
193 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
189 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
258 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
172 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
22 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
212 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
539 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 ...
2
votes
1answer
471 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 = ...
2
votes
1answer
395 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
50 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
289 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
167 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
82 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":{}, ...
2
votes
2answers
160 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
58 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
2answers
480 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
179 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
724 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
931 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
1answer
424 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
243 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 ...
6
votes
3answers
687 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
340 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
30 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 ...