An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

1
vote
1answer
20 views

Openlayers: select a feature programmatically from GeoJson

I am working on a project that uses openlayers (version2.14)to display a Bing layer(GeoJSON format), I have no problem reading the GeoJSON and display features, but I want to select a feature ...
0
votes
1answer
19 views

How to load geojson vector tiles from mapbox id?

I have some data hosted on mapbox and I'm trying to load it as tiled geojson into Leaflet from its mapbox id (I just want to get plain geojson, I'm not trying to render it). How can I achieved that? ...
2
votes
0answers
17 views

How to load GeoJSON into PostgreSQL database using Python?

What I have tried to do is (In Python IDLE): import psycopg2 import json try: conn = psycopg2.connect("dbname='carto' user='postgres' host= localhost password='password'") except: print "I am ...
0
votes
1answer
30 views

PostGis - BBox -vs- ST_intersects Queries

CartoDb Recommend here that the following query is faster than an St_intersects Query SELECT * FROM {table_name} WHERE the_geom && ST_SetSRID(ST_MakeBox2D(ST_Point(-73.9980, 40.726), ...
1
vote
1answer
20 views

CartoCSS Expression for shield-name

Is there any way to use a regular expression to filter a string when using CartoCSS expressions? I have geojson of some ways and route relations I obtained using Overpass Turbo. When creating a new ...
0
votes
1answer
21 views

Adding drop-down menu on leaflet map instead of L.control

I have created a choropleth map including several layers from the same geojson layer which is turkeyData in my case.I actually did it and it works fine. But I like to change the standart leaflet ...
1
vote
1answer
39 views

Write GeoJson into a .geojson file with Python

I want to write a geosjon object with the type <class 'geojson.feature.Feature'> into a .geosjon file. Therefore I tried to use with open(test.geosjon, 'w') as outfile: ...
0
votes
1answer
16 views

ogr2ogr: don't import properties on each feature?

I have a 2MB shapefile that when converted to GeoJSON becomes 10MB: $ ogr2ogr -f "GeoJSON" -t_srs EPSG:900913 landfill.geojson Authorised_Landfill_Sites_010k.shp I can reduce the size of the ...
2
votes
2answers
160 views

GeoJSON java library

I am creating a Java web service that receives GeoJSON. Does anyone know a java library to manage GeoJSON?
0
votes
1answer
31 views

Export KML from GeoJSON in QGIS and coordinates change?

I'm very new in this area. I have a geojson vector layer file, with coordinates like { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 487677.2993499999866, 112018.26101 ] } }, ...
1
vote
1answer
32 views

PostGIS returning a field one level higher in the Json

I have the following SQL on a PostGIS Database ($properties contains a list of fields, including osm_id) SELECT row_to_json(fc) FROM ( SELECT 'FeatureCollection' As type, ...
1
vote
0answers
32 views

Saving data in OL3

I have a small app where I would like to be able to digitize new features and save them for use outside the app. I am using geojson as I don't have a geoserver I have managed to create a button that ...
1
vote
1answer
29 views

Most efficient method to get national-level data displayed with Leaflet

I'm looking for the most efficient way to get a national or U.S. and Canada level dataset working with a JS mapping library. My problem is there's a myriad of technologies that seem like they can ...
0
votes
0answers
29 views

OL3 error with Style function

I am trying to style a .json layer with a numbe of classes based on an attribute. I and getting the error below which is apparently in ol3.js based on debugging in chrome: Uncaught TypeError: ...
1
vote
1answer
45 views

Difference between TileStache and Geoserver?

I have troubles to understand the differences between TileStache and Geoserver. My goal is to serve tiled geoJson through a restFull API and consume it with Leafet. Which one is the best for this ...
2
votes
1answer
33 views

d3 + Leaflet apply class value from geojson data

I have a geojson file that I'l able to draw just fine with D3 + Leaflet. I'm having trouble applying a class to the svg objects with a value from the geojson file. Each feature in the geojson file has ...
3
votes
1answer
32 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 ...
1
vote
1answer
32 views

How to add GeoJSON layer with GraphHopper?

I have a GeoJSON file containing some POI that I would like to be able to display within a separate layer with GraphHopper. But after several tries and search over internet, i can't manage to get a ...
0
votes
0answers
22 views

increase gdal_polygonize's capacity

I have a very big PNG (82500x40900) with more than 5000 polygons. I want to use gdal_polygonize but the geojson output shows that gdal_polygonizer stopped after 4770 polygons and the geojson isn't ...
0
votes
1answer
35 views

Is gdal_polygonizer creating a wrong geojson?

I have this PNG and I use gdal_polygonize 0VxOhek.png -f "geojson" 0VxOhek.geojson This is the output. There is a "features"-array which contains many objects with "type", "properties" and "geometry" ...
2
votes
2answers
62 views

How to encode a point geometry in Geojson?

I have point geometry in posgresql which I query as follows: select ST_AsText(geom) as pointgeom from pointable. I'm using python as server side script. I want to pass the result as Geojson response ...
0
votes
0answers
12 views

Deviated InfoBox - Geojson

I tried to showing info-Box after click (onmouseclick), that is goes well but info-Box's location is far away from my geojson area. Can Someone explain to me what happen in here?
0
votes
1answer
73 views

Add 'name' from GeoJSON to Leaflet List Markers control

Im my web app I use Leaflet List Markers plugin (https://github.com/stefanocudini/leaflet-list-markers). Markers loaded as GeoJSON from GeoServer. I want dispaly name of markers in list control, but ...
2
votes
2answers
36 views

Coordinate Not Match - Convert Shapefile to Geojson

I'm a newbie at GIS programming and I have a problem with file conversion. I've tried to convert shp file to geojson, and the coordinates do not match. But when I try to convert it to kml, it goes ...
1
vote
1answer
35 views

Leaflet interactive styling does not reset style correctly on mexican state geojson layer

I adapted the leaflet tutorial for an interactive choropleth map to create hover highlights and zoom functionality to my Mexican states map. Oddly, when I test out the highlight it leaves certain ...
0
votes
1answer
39 views

Open Layers 3 geoJSON not loading

I am having trouble loading a geoJSON layer (below is my defintion). everything works fine when I read the file locally in a web browser e.g. file:///Z:/inetpub/wwwroot/bang.html however when I try to ...
3
votes
1answer
31 views

Leaflet: Change point icon (geoJSON) on click and change back when clicking another point

I would be very grateful if someone could help me with this. I have a geoJSON (10 points) that is drawn using an icon. I want to change the icon when I click on one of the points and then I want to ...
1
vote
1answer
33 views

Layer toggle disappears leaflet

I'm having a bit of trouble finalizing a project I'm working on. When I upload my map to filezilla, my map layer toggle doesn't show up: before uploaded: after uploaded: Does anyone have any idea ...
0
votes
2answers
101 views

OL3 Style function

I am attempting to write a style function within an open layers 3 application that will change the fill color of a circle based on an attribute from a geoJSON piece of data. I have looked over stack ...
5
votes
2answers
64 views

Access geojson from github in leaflet

I am new to json, github, and leaflet. But I am trying to create a simple application which will render my points which are in geojson up on github. From everything I have read this should work. ...
1
vote
0answers
13 views

OpenLayers 2: Transform the geometries for a list of feature objects

I am trying to export GeoJSON for a list of feature objects. The features are in EPSG:3857 projection and I would like to convert all geometries to EPSG:4326. I am perfectly capable of doing this by ...
1
vote
1answer
67 views

Geoserver WFS GeoJSON layer in Leaflet, having trouble diagnosing 'Uncaught TypeError: undefined is not a function (Anonymous Function)' error

Pardon me if this has been addressed, I searched as far as I could for similar errors. I'm trying to serve a large amount of polyline data as a geoJSON layer from GeoServer to a Leaflet instance. ...
1
vote
0answers
21 views

GeoJSON to routing graph

What are the best automated ways of placing the nodes and edges of a routing graph using the GeoJSON data of a multi-level building? What other data is needed (area layout, accessor directions etc)?
2
votes
1answer
42 views

OL3 - Y Axis inverted

I have a custom map, served by our custom internal map server (XYZ) showing up in OL3. This works perfectly, but now I have to put some vector shapes over the top, these shapes are coming from an SVG. ...
2
votes
2answers
61 views

What's the best way to determine if a point is within a certain distance of a GEOJSON polygon?

What's the best way to determine if a point is within a certain distance of a GEOJSON polygon? Should one use TurfJS buffer method (https://github.com/Turfjs/turf-buffer#turf-buffer)? Can one perform ...
0
votes
1answer
138 views

D3.js cannot render my geoJSON file

I've been trying to draw maps using the d3.js library in a manner similar to that below. <script> //Width and height var w = 500; var h = 300; //Define path ...
2
votes
2answers
68 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 ...
1
vote
1answer
109 views

shapefile for mumbai area or section wise

I am working on a project in which i need to plot data on Mumbai city map section wise or area wise but i am not able to get Shapefile for the same. Can anyone please provide me the link where i can ...
0
votes
1answer
18 views

How to plot a Start and Stop point while drawing a line in CartoDB?

My visualization plots a bunch of lines on a map using CartoDB using a Start coordinate and a Stop coordinate. My data contains geojson formatted coordinates (for each row) I want to show a "Start" ...
0
votes
0answers
39 views

Why can't gdal save CRS information to GeoJSON?

gdal fails to add CRS definitions to GeoJSON files in some cases. Try this, for example, from any linux terminal that has gdal installed: # download the data wget ...
0
votes
0answers
34 views

error converting shapefile to geoJSON with Ogre online tool

I am using on online tool built with ogr2ogr to convert shapefiles to geoJSON: http://ogre.adc4gis.com/ It's worked well except for one shapefile, and I can't see why... The shapefile has only six ...
2
votes
1answer
142 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
18 views

QGIS geojson vector layer

When I add vector layer to QGIS using geojson protocol, data form server are being displayed. Problem is that every change of map extent (pan, zoomIn, ZomOut) is causing request for same data again. ...
1
vote
1answer
46 views

How do I make my map use a set of coordinates

Right a little background. I've made a custom google map with the google map api which has a few functions that work well within it - one specifically is limiting the user on what they can view within ...
0
votes
1answer
84 views

ogr2ogr convert DXF to GeoJSON with defined geometry

I trie to convert a DXF file into a GeoJSON file with: ogr2ogr -f 'GeoJSON' -sql "SELECT * FROM entities WHERE layer = 'geom_test'" test.json dfxtest.dxf Is it possible to convert only geometries ...
1
vote
3answers
59 views

How can I create GeoJson map from OSM Data

I am trying to build a map of countries in the some countries in Europe (Spain/France/Portugal). What is the best way to build such map: Should I look for shp files, then concatenate them. Is ...
0
votes
1answer
22 views

GeoJSON: line connecting features

How do I create a line connecting Features in GeoJSON? I hope to avoid having to re-enter coordinates for the polylines I use to connect the Features separately...
1
vote
1answer
58 views

Click Events with Leaflet and geoJSON

How do I attach a click event to a geoJSON that then executes an Ajax function when clicked. I looked into onEachFeature but that executes when the geoJSON is loaded, not when clicked, thus executing ...
0
votes
2answers
173 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 ...
1
vote
1answer
121 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 ...