Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
293 views

Converting GeoJSON to ISOXML ISOBUS ISO 11783-10

How do I convert some GeoJSON files to ISOXML files (ISO 11783-10)? I found several questions on this topic: Converting GeoJson/Shp to Iso-xml (ISOBUS ISO 11783-10) https://stackoverflow.com/q/...
1
vote
1answer
29 views

Parallel offset on Folium

Is there any way to add parallel offset for those lines which oneway road are False? All line here are straight (segment). So We just have two points for each line (start and end points). # There is ...
5
votes
3answers
7k views

How can I export a GeoJSON file from R?

The write. function allows one to export a JSON file, but it does not seem to work for a GeoJSON file. This is the code i ran: write(map,"Map Layer2.GeoJSON") and this was the error produced: ...
1
vote
1answer
94 views

Multiple GeoJSON filter based on properties in Leaflet by button — work with only first Property

I am trying to filter my geoJSON layer (school) based on those properties: Type ( primary - preparatory - high ) Time ( day - night - alltime ) Gender ( male - female ) What I need : After user ...
1
vote
1answer
21 views

Rendering overlapping polygons without holes in multipolygon in Leaflet

Is there a way to render overlapping polygons without holes in multipolygon in Leaflet? I found Leaflet has an open issue. codesandbox.io I am asking because I have a bound polygon that contains inner ...
3
votes
4answers
604 views

How to convert an OSM relation to a list of lat/lng points?

I would like a convert a relation (e.g. https://openstreetmap.org/relation/2851613) to a list of coordinates that can be displayed on a map, potentially using geojson. I ported over this converter ...
0
votes
0answers
12 views

How to toggle Folium background map

I would like to hide/display the map when clicking somewhere. Does Folium have any parameters for that? folium.Map(location=[48.86088, 2.33765], zoom_start=8)
0
votes
0answers
33 views

Adding points from GeoJSON file to the Leaflet map

I'm trying to add points in my Leaflet map GeoJSON file, but I can't. I wonder what am I doing wrong with this code? GeoJSON file : { "type": "FeatureCollection", "features&...
2
votes
2answers
1k views

Simplify a shapefile/GeoJSON polygon without “uncovering” territory?

I've been using Mapshaper to simplify some very complex polygons (boundaries of countries). The goal is to create relatively simple polygons which can be used to determine whether a given lat/lon ...
4
votes
2answers
2k views

ogr2ogr PostgreSQL to geojson batch export

trying to export 20 postgreSQL tables to geoJSON using ogr2ogr ogr2ogr -f "GeoJSON" C:\path\Desktop\geo PG:"host=localhost user=postgres dbname=free password=xx" -t_srs EPSG:4326 ...
2
votes
0answers
19 views

Converting SVG files to GeoJSON

I am struggling with converting SVG files (with geographic coordinate metadata) into a GeoJSON file. I have been trying the svg2geojson command line util and online conversion tool MyGeodata Cloud. ...
0
votes
0answers
26 views

Extracting geometry for each child of GeoJSON [closed]

I have this data as a GeoJSON (the JSON can be found here). What I am trying to accomplish is that, for every region (region == children in this dataset), get a row that looks like this: id name ...
1
vote
1answer
30 views

DWG to GeoJSON in QGIS 3.18

I am Using QGIS 3.18 or 3.10. I have imported a DWG file with many layers and many type of features (hatch, point, polyline). I want to converts them to GeojSON format. Is there a way to export all ...
3
votes
1answer
718 views

Receiving data from php script for geoJSON TileLayer?

I want to get geo data as geojson for geojson tile layer requests in leaflet. I set up a geojson layer like this: https://github.com/glenrobertson/leaflet-tilelayer-geojson/ A php script answers ...
4
votes
2answers
68 views

GeoJSON to CSV with geometry using QGIS

I downloaded a GeoJSON file from vangdata.carto.com and I'm trying to convert it to CSV that has geometry data in tact. I'm trying to achieve the same result as a CSV file when exported from public....
0
votes
0answers
31 views

Using GeoPandas to generate shapefile from GeoJSON that could be open for ArcGIS

I got from an API a layer of parcels in format GeoJSON, just like the file in this .zip https://www.dropbox.com/s/5eqi8bbqt6ej6lc/json_data.rar?dl=0 I need to convert this to a shapefile that could ...
0
votes
0answers
38 views

Fetching JSON data from URL

Here is my code and (console.log(feature)) gives me URL that has data in console. How can I fetch data and use it as var? map.on('singleclick', function(evt) { var view = map.getView(); var ...
-1
votes
1answer
527 views

Searching Polish districts in JSON

I am looking for a map of polish 'powiaty', eng. 'county' or 'district' (i.e. second-level unit of local government and administration in Poland, equivalent to a county, district or prefecture) in ...
0
votes
1answer
152 views

Extract custom shape area from Openstreetmap pbf

I have a full-country data download of OSM from http://download.geofabrik.de/ . I want to extract OSM data for a target area that is thin and winding/irregular in shape. I could take the max-min lat-...
1
vote
0answers
43 views

Spatial operations with JSTS

I'm working with Leaflet and I'm also working with JSTS to do the spatial operations. In most of the cases I want to create Polygons inside another Polygon Geometry. In this case the yellow shape is ...
1
vote
0answers
26 views

Query to Display Polygons not Working on Geodjango-Leaftlet Web App

I am currently working on a Geodjango-Leaflet-OpenStreetMap web app. I have around 540000 polygons of property boundaries that were drawn in ArcMap; the polygons will be imported to the web app later ...
0
votes
1answer
35 views

SpatiaLite splitting large polygons from imported shape file into multiple rows

I have this shapefile: shapes.shp in which I have imported in SpatiaLite using this command: spatialite_tool --import --shapefile shapes --db-path db.sqlite --table shapes --charset UTF-8 --srid 27700 ...
1
vote
1answer
53 views

Dump multiple geometry columns of a GeoDataFrame to Features in a FeatureCollection (GeoJSON) instead of properties?

I have a GeoDataFrame with some of its attributes that are geometries (only the position is the one which was interpreted as the active geometry when loading the data from PostGIS): import psycopg2 ...
0
votes
1answer
23 views

GeoJSON map color does not change

I am trying to code save/load function. I can say my save and load function works properly because it displays on console that for example when I load "Canada" file from database, it shows ...
0
votes
3answers
3k views

Mapbox Feature icon-rotate as symbol

I have a requirement to enable a user to Rotate a single feature they've added to the map. The feature is part of a geojson FeatureCollection and styled as a symbol with layout properties. Obviously ...
0
votes
1answer
39 views

Creating a Rectangle in GIS using JSON

I am trying to use a USGS product called AppEARS to download data. I want all data across the world, but the interface wants me to specify a region. How can I write a JSON file that will allow me to ...
0
votes
1answer
18 views

Gdal_polygonize and gdaltindex error

I'm trying to convert .tif file to .geojson using following cmd: gdal_polygonize.py flowdirection.tif -f "ESRI Shapefile" flowdirection_shp.shp After which I'm getting error: Program '...
1
vote
1answer
13 views

Output in GeoJSON data format using Ruby

I have some data with Ruby script (obtained by geolocating, loading from config files etc) that I want to output as a GeoJSON file. I have some ugly code that generates valid geojson files - but is ...
3
votes
2answers
4k views

Extract geojson 'properties' dynamically with mapbox gl

I have an interactive map based on MapBox WebGL. I have an 'on click' function which is returning all information on data layers at that location (lovely). For each object I am trying to pull out ...
1
vote
1answer
41 views

Display a track comment when clicking a track in Leaflet multi track layer

See this question Displaying different tracks from one GPX XML file in different colors in Leaflet If I hover a track the hand transforms into an index pointer but if I click nothing happens, see ...
1
vote
0answers
47 views

Finding closest marker to user location Leaflet KNN

I am using Leaflet KNN and would like the closest station to a users location, from the web browser, to have a pop up saying it is their closest station. How can I find the nearest marker to the user ...
1
vote
1answer
22 views

How to ensure the values set in the CSV are captured within the GeoJSON feature values when merging CSV attributes into a GeoJSON

I create a GeoJSON but the merged values are null. The length of the datasets do not match -- is this a potential issue? If so, how do I merge for all covid matches. (FYI this isnt Covid19 related COV ...
1
vote
1answer
17 views

MapBox GL - filtering GeoJSON by feature index

I'm using MapBOX GL JS with GeoJSON data source. The content of the GeoJSON is changing dynamically. It is a FeatureCollection which contains polygons. I would like to update my MapBox data source ...
1
vote
1answer
27 views

How to visualize different segments of a MultiLineString?

I have a GeoJSON file that describes the outline of an ice shelf; I hand-digitized the geometry from satellite imagery and DEMs. The data consists of a MultiLineString, but some of the constituent ...
1
vote
1answer
98 views

Select several polygons with the same identifier in GeoJSON layer

I have a map application where: I load polygons as GeoJSON objects I draw all polygons in a single layer I highlight a polygon on mouse hover from a identifier list Some polygons have the same ...
3
votes
3answers
1k views

Convert GeoJSON directly to geodatabase

I'm looking for a way to convert a GeoJSON File (from overpass-turbo.eu) directly into a Feature Class in an Esri geodatabase. Normally I'm doing this by loading the GeoJSON into QGIS, Export it to a ...
0
votes
0answers
19 views

Markers appearing slightly off their points when Leaflet map zoomed out [duplicate]

I have noticed that the markers on my Leaflet map are displaying slightly off where they should be. However when I zoom in they go to the correct position. Is this a common error? How would I go about ...
1
vote
1answer
1k views

How to display the GeoJSON from PHP on the map?

I am using MapboxGLJS. I retrieve the coordinates from my database and I put it in GeoJSON format on PHP which look like this: <?php $sql = "SELECT * FROM waypoint"; $...
0
votes
1answer
64 views

DotSpatial reprojection introduces offset compared with QGIS

Im writing a converter from shape file to Geojson using C# and DotSpatial to do coordinate conversion. Currently this mostly works, with newly created shape files in QGIS the coordinates are perfect ...
1
vote
1answer
349 views

Get error when I try to display a GeoJson file with Openlayers 3

I get some errors when I try to add a Geojson file with Opelayers 3. I did follow the first answer here : Add GeoJSON layer to OpenLayers 3 But I got the following error : XMLHttpRequest cannot ...
4
votes
1answer
2k views

Leaflet filter on geoJson properties : multiple criteria

I'm using Leaflet filter on geoJson data. I'm able to apply it with a simple criteria : filter: function(feature, layer) { return feature.properties.field1 == "yes"; } I can also apply ...
0
votes
2answers
35 views

GeoJSON Datastore and GeoServer

I found a way that should allow to use (Geo-)JSON flies with GeoServer: An unsupported GeoTools GeoJSON Datastore (thanks to this answer) Here is a link to the jar: https://mvnrepository.com/artifact/...
11
votes
2answers
9k views

Is there any efficient way to convert GeoJSON to WKT?

I want to use ST_GeomFromText() to load vector data to PostGIS. However, I don't know how to convert from Geojson type to WKT. N.B. I know I can use OGR2OGR to upload the GeoJSON directly, but I just ...
0
votes
1answer
50 views

GeoJSON coordinates transformation to Web Mercator coordinates

I'm not sure how OpenLayers is converting the raw coordinates from a GeoJSON's geometry.coordinates property into a Feature's extent property. I can't really seem to find a lot of documentation on it ...
3
votes
1answer
2k views

Folium heatmap not displaying

I have an output file data.json [{"5403": 2, "9734": 1, "2565": 5, "5087": 2, "9061": 1, "1761": 4, "4811": 7 "1111": 5, "3891": 3, "1962": 3}] and a shapefile converted to geojson https://www....
1
vote
1answer
20 views

Order and orientation of pgRouting result

I have a routing application based on pgRouting and OSM data. When I generate a route from coordinates A to B, it works well, but when I export the geojson to GPX format, I notice, that some ...
8
votes
1answer
282 views

QGIS removes id field when saving as GeoJSON

I have a GeoJSON file of points which I am editing using QGIS 2.16.1. { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": ...
1
vote
2answers
48 views

Changing leaflet circle marker colour and size when clicked upon

I am currently using GIS to plot train stations within Wales I have currently made a custom circle marker to point to that of the stations latlng successfully adding it to the map. I am wanting the ...
0
votes
1answer
40 views

Manipulating data with a Handsontable spreadsheet in a Leaflet GeoJSON Layer and rerender the map

The goal is to add a spreadsheet view to a GeoJSON Layer to comfty edit the properties directly in the spreadsheet and the location (lat/long) within the map by dragging the marker with leaflet.draw. ...
0
votes
1answer
33 views

Using large data JSON file in Leaflet markercluster [closed]

I want to show the JSON file consisting of many points on the map using the leaflet marker cluster plugin. My JSON file looks like: [ { "json_featuretype" : "Output", "...

1
2 3 4 5
44