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

learn more… | top users | synonyms

2
votes
1answer
515 views

installing geojson-vt with Leaflet

Super rookie question I'm sure, but I need help using the leaflet plugin geojson-vt. According to tutorials, like this one on http://bl.ocks.org/Sumbera/c67e5551b21c68dc8299, there should be a js file ...
0
votes
2answers
350 views

Reading in local geoJSON file for openlayers

I am kinda new to openlayers and not (yet) very experienced in javascript. Can anyone tell me what I am doing wrong here? I have a wordpress blog and I want to replicate and adjust the following ...
0
votes
0answers
58 views

Web mapping application with select/unselect features and receiving names of selected features on map

I am creating web application that need to have the following functionality: display polygonal features on the map (about 20-50 Mb if GeoJSON) on click on feature - select them and view names ...
0
votes
1answer
205 views

How to draw a rectangle on a Leaflet map from GeoJSON data

I am trying to draw a rectangle on a Leaflet map with JSON data which looks like this. var geojsonfeatures = {"type":"FeatureCollection","features":[ {"type":"Feature", ...
0
votes
0answers
57 views

Does Leaflet handle TopoJson in OSGB EPSG:27700 projection?

I already have a Leaflet map showing custom base map tiles in British OSGB projection, EPSG:27700 (using the Proj4Leaflet plugin). I would like to overlay some nationwide admin boundary data in the ...
1
vote
0answers
45 views

Validate that Openlayers GeoJSON layer is in the correct format with OpenLayers.Protocol.HTTP call

I am completely new to JS and openlayers, i am trying to figure out a way to validate the received layer with the OpenLayers.Protocol.HTTP call. I want to validate that it is in the correct format ...
0
votes
0answers
27 views

Leaflet GeoJSON ignores first clicks

I have a functioning Leaflet map. In order for the click event to work I have to click on the area that has the event then click on an area without an event then click on the area with the event to ...
0
votes
1answer
1k views

Convert Lon Lat to XY in Openlayers 3

I have a map which retrieves Points of Interest from a database and displays them however the Lon Lat need to be transformed into XY to be placed properly. Currently the all just appear at O,O and I ...
1
vote
1answer
259 views

Issue dsplaying GeoJSON file in OpenLayers 3.9.0

I'm trying to get vector feature from geojson file displayed in openlayers 3.9.0. {"type": "FeatureCollection","crs": {"type": "name","properties": {"name": "EPSG:3857"}}, "features": [{"type": ...
1
vote
1answer
48 views

Openlayer3 3.9 vector layer ignores some linestrings

I updated my small OL3 project to 3.9 but noticed that one of my vectorlayers now only displays very few features: Other point layers work fine. Also I checked the basics: Browser calls and ...
2
votes
2answers
77 views

How to enable Arabic/UTF8 labeling in Openlayers?

I have data in Geojson contains arabic in some attribute when reading the attribute info.push(features[i].get('Name')); I get this Unreadable how to enable utf8 or I dont know....
1
vote
1answer
143 views

Mapbox Directions Plugin - Get Route GeoJson

Goal: find the GeoJSON points in a web map that are closest to a directions route using turf.js. I am using the Mapbox Directions plugin. I am following this example. How do I work with the route ...
1
vote
0answers
140 views

Can you check if a gps coordinate is inside a gps polygon in R?

I'm trying to determine if a specific gps coordinate is within a gps spatial polygon. My gps coordinate is being outputted from the geocode function from the ggmap library and the spatial polygons ...
1
vote
2answers
152 views

Loading Json properties in a popup using leafletjs

I have a geojson file (tide_gauges.geojson) { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, ...
2
votes
2answers
123 views

ogr2ogr - Lost projection when converting geojson to MapInfo Tab

I have the following geojson that I would like to convert to MapInfo tab with ogr2ogr: ogr2ogr -f "MapInfo Tab" output.tab input.geojson geojson: { "type":"FeatureCollection", "crs":{ ...
1
vote
1answer
112 views

ogr2ogr - Convert geojson to shapefile create offset in coordinates

I want to convert this geojson file below into a shapefile using ogr2ogr command ogr2ogr output.shp input.geojson. However, an offset is appearing in the output coordinates that make the shapefile ...
0
votes
0answers
133 views

Using multiple custom markers from geojson attributes using Mapbox

I'm new to Mapbox and ran into the following problem: I'm loading marker positions from an external geojson and want to manipulate the looks of several markers filtered by an attribute like "title". ...
1
vote
2answers
674 views

Convert WKT to GeoJSON with leaflet

I have a point type WKT geometry column in a MySQL table storing the location of some stores. I want to display it on a leaflet map on my website. I've found plenty of tutorials to doing this on ...
2
votes
0answers
43 views

Combine files in TopoJSON when one is simplified differently to the other

I have two .shp files, I am separately converting these to GeoJSON with ogr2ogr.exe and then combining the files with TopoJSON. Each file independently becomes a ~200kb topojson file, however the ...
0
votes
0answers
21 views

Creating Map Service for ArcGIS Online from JSON file?

I have a .json file which I would like to be able to import into ArcMap to then publish as a map service to ArcGIS Online. The format of the json file when I receive it is like this: ...
0
votes
1answer
318 views

How to extract style data from DXF when converting to geoJSON

I am using ogr2ogr (GDAL) to convert DXF files (from autoCAD) to geoJSONS for usage inside Leaflet.js The issue is that a lot of information, like line stroke size and colors are not kept during the ...
0
votes
1answer
444 views

How to use leaflet-search for a geojson feature property?

I'm trying to use the leaflet-search plugin to search for a specific geojson property (i.e. 'Name'). The trick part of this is I want to perform a search on a Geojson file thats loaded in via the ...
0
votes
0answers
33 views

Accessing Topojson features

I am having trouble with accessing the "density" property of my TopoJSON file. Basically I want to change the density property or add another property named "metric" in my properties and make the ...
0
votes
0answers
79 views

Save JSON from Openlayers using AJAX

I am trying to build a web app where users can use OpenLayers to draw features and then save them either as a download or write to a file on the server which I can collect when I need it. I am happy ...
0
votes
1answer
189 views

Get GeoJson feature by ID and zoom on entity

I have got a leaflet map with Geojson layers : I use jquery Autocomplete to search an entity by name or id, I have no problem with that. I need your help because I'm not able to refer to a specific ...
6
votes
0answers
97 views

GeoJson structure

I currently designing a table/document database structure and use GeoJson to store points and routes. Currently I choose MongoDb, I will consider PostGIS later. I want to store route info for public ...
1
vote
2answers
393 views

How can I represent Time in GeoJSON?

I'm modelling a bus route as a series of waypoints. Most of these waypoints have just a latitude and a longitude and represent points along a road. However, when the bus gets to a bus stop, the ...
3
votes
1answer
262 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
337 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 ...
1
vote
1answer
73 views

Can you display data from a csv (or other file format) onto a GeoJSON popup?

All, I'm trying to display data from another file such as a csv into a GeoJSON popup window. So far I know I can match the data using a nested for loop with a common id between the two files, but I'm ...
0
votes
1answer
164 views

Leaflet GeoJSON style function feature only colors one GeoJSON feature

I need to style every feature differently that I pull from a GeoJSON file. However this anonymous style function only changes the style on the first feature it comes across and stops. I am new to ...
0
votes
1answer
297 views

Leaflet Marker Cluster from GeoJSON

I've created marker cluster in this example and now I want to show the same thing with data from GeoJSON, but it doesn't work. I'm trying to reproduce same situation in this example, but marker ...
5
votes
4answers
1k views

Methods to Convert .SVG File to GeoJSON

Question How do I convert an SVG file to GeoJSON format? Desired Outcome: I want to make a choropleth map using something like D3.js, or any of the other libraries out there. Challenge: I have an ...
1
vote
1answer
44 views

Certain polygons not obeying JavaScript style rules?

http://catalinagis.org/ownership You can see that some of the parcels don't follow the fill style rules (opacity: 0.5) even though the same style rule applies to all polygons in the data. This ...
2
votes
0answers
88 views

Different Leaflet fillcolors for different layers

I have a leaflet map set up with two layers and I want them to use different colorization functions to color the choropleth shapes. My shapes are set up in layers like this: var povertyLayer = ...
1
vote
0answers
65 views

show polygon from database in browser in geodjango

I tried to retrieve the polygon which I saved into postgis database. (all polygons) Here is my code: models.py from django.contrib.gis.db import models class MyMap(models.Model): name = ...
1
vote
1answer
65 views

Shared edge between two geojson polygons

I am interested in getting the coordinates of a shared edge (if exists) between two geojson polygons. I am (currently) using turfjs and geojson-equality libraries I tried this but I consider it quite ...
3
votes
1answer
230 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 ...
2
votes
1answer
214 views

Best approach for indexing a SQLite database containing geoJSON spatial objects?

I'm building an iOS application for public release. My architecture currently includes Mapbox, Parse, geoJSON and SQLite for the local store. The app will store spatial objects locally as a string in ...
0
votes
0answers
70 views

get the outline of a polygon

I have geojson data that draws shapes similar to the following: I wanted to know if there are any operations that can give me the geojson which represents the outline of these shapes represented by ...
1
vote
1answer
63 views

How to pass custom data in GeoJSON point?

I have an application, which creates a GeoJSON stream on the server, which is then rendered on the client (using CesiumJS). GeoJSON is created using GeoTools. I want to pass some custom data to the ...
1
vote
1answer
166 views

ogr2ogr problem mapping shapefile to geojson ETRS89 / Poland CS92

I'm trying to convert official boundaries of administrative regions of Poland from official governmental site (codgik.gov.pl). I want to use those data because they are official ones, and set contains ...
0
votes
1answer
238 views

How to filter polygons in Leaflet using range slider

I have a map I'm working on with Leaflet that displays a choropleth of zip code-level data. One piece of functionality I would like to add is to allow users to use a range slider to filter out ...
1
vote
1answer
78 views

mapbox geojson + leaflet + custom markers [duplicate]

In the geojson file the following can be found for a marker (coming from mapbox geojson) "marker-color":"#1087bf","marker-symbol":"monument"} I would like to find a solution so monument will be ...
1
vote
1answer
34 views

Tile server return empty features

I have successfully installed tilestache. I also has succesfully add a layer using shapefile from here. But when I tried to use my own shapefile, the server always return empty featurecollection. I ...
2
votes
1answer
558 views

Upload KML / GML / GeoJson to Geoserver through Rest API

What is the best option, if any, to upload a vector format like GeoJson, and or GML to Geoserver? The environment from which to upload will be a client web-application, so i cannot use curl. In the ...
3
votes
1answer
108 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, ...
2
votes
1answer
88 views

How can I export a shapefile from PostGIS with a GeoJSON query?

I tried to export a shapefile from my PostGIS installation using pgsql2shp as follow pgsql2shp -f tiles.shp -h <host> -u <user> -P <pass> <database> "SELECT id, the_geom FROM ...
0
votes
0answers
148 views

Change label size in OpenLayers 3 from QGIS Plugin output

I am working on OpenLayers 3 at the moment and my aim is to provide an offline map. At the moment I am trying to get GeoJSON files offline. For that I am using the QGIS Plugin that exports the ...
0
votes
1answer
100 views

Have to click twice to open popup leaflet

I am trying to make a map in which a marker can be clicked and a popup opens up with some information. I have successfully done all of that however my first click on any of the markers result in the ...