Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
2 votes
3 answers
68 views

Converting a shapefile into a Power BI ready JSON file

I have a .shp file that I want to use in my Power BI dashboard, however I keep running into multiple issues. Because Power BI only accepts TopoJSON for its shape maps, I have to do some ...
jespergeospatial's user avatar
1 vote
0 answers
29 views

QGIS - Export layer with one polygon subdivided as multiple rows to CSV

I have a GeoJSON file with quite precise boundaries of world's countries. I had to simplify it because Snowflake, where I want to keep the data, has 16MB limit and Canadian polygon is always too large....
Moseleyi's user avatar
  • 291
0 votes
0 answers
12 views

Converting line feature to MBtiles through engine, but line is getting messed up and forming helix

We have been trying to upload a line feature (Road Network) on Maptiler cloud through Maptiler engine as a MB tile, after uploding the line is getting jagged and misshapen. I tried using geojson, ...
Stef's user avatar
  • 1
1 vote
1 answer
43 views

Retrieve geometry from GeoJSON to L.polygon in Leaflet?

Since I have a problem with Leaflet draw, which, unfortunately is discontinued, I'm trying to rely on Leaflet editable for editing: before I learn how to save edits, I just want to retrieve a polygon ...
Vincent Dc's user avatar
1 vote
1 answer
42 views

Export just the route within bbox from Overpass Turbo, not the tags / way points?

I'd like to export just the route from an Overpass Turbo query as GeoJson, and ideally just within a specified radius of a set of coordinates. I have the query below, but this exports tags / ...
Chris's user avatar
  • 73
0 votes
1 answer
49 views

Using Overpass Turbo output as GeoJSON input to leaflet.js [closed]

I'm trying to get GeoJSON using Overpass Turbo for a number of roads within a certain area. The input to Overpass below produces a map with the selected roads highlighted and what looks like JSON, ...
Chris's user avatar
  • 73
-1 votes
0 answers
15 views

TypeScript packages that can help validate a geometry object before saving in MySQL database [closed]

Currently, I use the booleanValid function from turf to validate a geometry object before inserting it into the database. Upon testing, I found scenarios where it doesn't correctly check if a loop is ...
Karim Fayed's user avatar
1 vote
1 answer
20 views

Get polygons from JSON request in an ArcGIS webmap

I'm trying to scrape some polygons from an ArcGIS webmap, and outside requests/ REST API don't work. I want to take the polygons I see in the webmap and turn them into a shapefile. The webmap of ...
Ben Hendel's user avatar
0 votes
0 answers
26 views

Rasterizing GeoJSON in C# to generate TIFF file

I'm trying to use gdal and C# to rasterize a GeoJSON object to TIFF. I can get my code to compile and run but the image is coming up blank. I'm not sure what I'm doing wrong. Maybe I need to specify ...
Tommie Jones's user avatar
1 vote
2 answers
58 views

Saving added GeoJSON data in the browser for future use in QGIS

I have managed to add a GeoJSON layer to QGIS via an HTTP protocol in my local machine. How can I save the connection in the browser so I can access it in other QGIS projects? Below is a sample URL I ...
GforGIS's user avatar
  • 2,440
0 votes
1 answer
34 views

read geojson file which is not in CRS 4326

I have a geojson file which i need to read/convert to sf object I read it with geojsonR package and it shows as lists of lists, but i need it to sf. I tried using st_read but it gives me "Error: ...
m45ha's user avatar
  • 101
0 votes
0 answers
103 views

Developing Heatmap using Next.js and react-leaflet

For a research project, I was tasked to develop a GIS very similar to https://cwfis.cfs.nrcan.gc.ca/interactive-map. This is the first time I will develop a GIS-related web application and I do not ...
Sonny's user avatar
  • 1
0 votes
1 answer
29 views

Extracting spatial information from a web map

I'm trying to extract spatial information from this website: https://www.ausgrid.com.au/Outages/Current-Outages Basically, they have a map showing all current outages and I want to get spatial data ...
Neil P's user avatar
  • 1
1 vote
1 answer
47 views

Initial zoom to GeoJSON object from file (.js) in Leaflet

I am building a viewer with Leaflet API and OpenStreetMap base. I want that when I enter this viewer it shows me immediately in the initial visualization the extension of my layer that I am using. For ...
MrShaggy87's user avatar
0 votes
0 answers
77 views

Trouble Reading GeoJSON Data in GeoPandas: "Failed to read GeoJSON data"

Trouble Reading GeoJSON Data in GeoPandas: "Failed to read GeoJSON data" I am facing an issue while trying to read a GeoJSON file using the geopandas library. Whenever I attempt to load the ...
Williams Adaji-Agbane's user avatar
4 votes
2 answers
870 views

Data too huge to access: Bing Australia Building Footprints

I am relatively inexperienced with QGIS. I seeking to access building footprints in a 20km radius from the centre of Melbourne city, Australia. The dataset I am hoping to use is Bing's 2020 Australia ...
J.Watt's user avatar
  • 51
0 votes
1 answer
69 views

Read GeoJSON object in a CSV file column and transform it to geometry

I have a column ('geo_shape') that contains GeoJSON object type of linestring geometry and, so far, I didn't manage to read and transform it to a GeoPandas/shapefile type of geometry. Here is a way ...
SKSLH's user avatar
  • 1
0 votes
1 answer
18 views

Custom project DXF data with metre units in JavaScript

I have a GeoJSON file with coordinates in metres in what I believe is the AutoCad World Coordinate System. (I converted from the DXF that was supplied to me, which was exported from AutoCad). The ...
Steve Bennett's user avatar
0 votes
0 answers
30 views

MySQL retrieving GEOMETRY Points (indexed) from a table which are within a GEOJSON polygon

I am trying to retrieve all of the points from a table which are within a GEOJSON polygon. I am running everything below through a Python function. So, I created a table from a CSV file of open data ...
David Graham's user avatar
0 votes
0 answers
31 views

How can I convert a GML with multiple layers to a GeoJSON and store layer name in FeatureType property?

I have a GML file that has multiple layers and I want to convert it to GeoJSON. Apparently, GeoJSON cannot handle multiple layers explicitly. Thus, I want to store the layer name in a property called ...
milad's user avatar
  • 649
0 votes
0 answers
28 views

Transformation needed for placing cartesian coordinate rectangle on map using geographical coordinates

I have come across a requirement to convert rectangle image with specific width and height to geographical coordinates so that it can be placed on map. I have all the four geographical vertices for ...
OnDWay's user avatar
  • 1
0 votes
1 answer
38 views

Passing geometry dataset type to gdal.Warp() for a clip operation - order of operations and file type confusion

Trying to wrap my head around the correct order of operations and file type(s) required by gdal.Warp(). I have a valid geometry object created from the shapely object.unary_union.convex_hull method. ...
bashity's user avatar
  • 109
0 votes
0 answers
59 views

map.getView().fit(vectorLayer.getSource().getExtent(), map.getSize()); is not working

I would like to know how to get all multipolygon features i.e all districts features display on my web map when I select state from dropdown list. This is the query i wrote to get all districts ...
Mounikareddy's user avatar
0 votes
2 answers
36 views

GeoJSON points not referencing to OSM map in QGIS

I've got a GeoJSON file that's written like so (it's 70 points, but for brevity I'm showing 5 here) { "type": "FeatureCollection", "crs": { "type": "name&...
user228312's user avatar
0 votes
1 answer
62 views

Exporting GeoDataFrame object with multi geometry columns to GeoJSON file

Is there a way to export GeoPandas GeoDataFrame with multiple geometry columns to a GeoJSON file? I tried the following but it gave an error: import geopandas as gpd from shapely.geometry import Point,...
Omer Tzuk's user avatar
0 votes
1 answer
53 views

Leaflet.markercluster with GeoJSON via AJAX [closed]

I am pretty new to this. Have found a similar question here but I have been unable to implement it in my own case. The markers show up just fine but no clustering happens. function onEachFeature(...
SoranDK's user avatar
  • 11
0 votes
0 answers
143 views

Uncaught TypeError: L.geoJSON is not a function

I am new to Leaflet and trying to add popup in leaflet map. I saw the example in leaflet website to add geojson polygon and popup on it. However when i tried to run it shows error: "Uncaught ...
Akhil Kumar's user avatar
0 votes
0 answers
29 views

Adding features from GeoJSON in hidden form field in OpenLayers?

I have an HTML form that includes some maps where the user can add features. The data is being saved in a hidden form field as GeoJSON. Example (simplified id and name attributes): <input type=&...
winnewoerp's user avatar
0 votes
0 answers
21 views

QGIS GeoJSON and color properties [duplicate]

I have a GeoJSON file which is exported from a GIS system on odoo in GeoJSON format. I need to import it into QGIS. I tried a plugin called "Quick GeoJSON". I copied and pasted the code and ...
Guido Fonzo's user avatar
0 votes
0 answers
19 views

Calculating area of GeoJSON features within Vector boundaries

I am attempting to calculate the area of total building footprints within each census block group within a state. The building footprints are a .geojson file type and my census blockgroups are a ...
Pierce_h's user avatar
0 votes
0 answers
9 views

Issue with attribute types when publishing GeoJSON to ArcGIS Online

I'm trying to publish a GeoJSON file containing lines and points to ArcGIS Online. The publication process is successful, resulting in a Feature Layer with two layers - point and line. Everything ...
Jiří Komínek's user avatar
0 votes
0 answers
35 views

Problem with OSM relation:restriction when mapping OSM data to GeoJSON

In OSM are mapped some restrictions, as for example turn restrictions. These are applied to specific node and to at least an origin linestring (from) and a destination linestring (to). I used ogr2ogr ...
Marco's user avatar
  • 1
0 votes
1 answer
56 views

Rigorously validate a GeoJSON polygon

I have a GeoJSON polygon which I'm suspicious about. It doesn't render properly in several different tools. Mapbox's Geojson-hint gives it a clean bill of health. The shape has many internal holes, ...
Steve Bennett's user avatar
0 votes
0 answers
22 views

Alignment of two slightly different vector layers

I have to vector layers. It seems like two of them are describing the same features, but slightly offset from each other. I have tried to align them manually using the Advanced Digitising Tools (Move ...
Li Na's user avatar
  • 1
1 vote
2 answers
196 views

Converting shapefiles from S3 to GeoJSON in JavaScript for web map

I am working on a web map using OpenLayers and have encountered a challenge in converting shapefiles stored in an S3 bucket to GeoJSON using JavaScript. My goal is to display the converted shapefiles ...
JNN's user avatar
  • 125
1 vote
0 answers
77 views

Adding GeoJSON layer using variable in OpenLayers?

When I use url reference of open layers and give a path from a local directory, then it correctly shows the layer on the map, but want to add through constant variable (comming) because I am getting ...
Shaheer's user avatar
  • 11
0 votes
1 answer
478 views

Setting marker cluster icon color dynamically in Leaflet?

In a Leaflet map, when a school point is clicked it passes an id of that school and adds a student point layer specific to that school. The point layer is rendered on the map as marker cluster. So, ...
user3072602's user avatar
1 vote
2 answers
81 views

Mask GeoJSON with nested Polygons/Nested donuts

How would I mask a geojson that looks like this {"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":&...
four-eyes's user avatar
  • 3,370
0 votes
0 answers
24 views

Compress GeoJSON by aliasing

I just come to know the GeoJSON files. I need to load the files as fast as possible to reduce render time in browser. So I want to reduce the file sizes by aliasing for example turning 'geometry' to '...
sicheng mao's user avatar
1 vote
1 answer
118 views

Clipping raster layer created by Georaster plugin in Leaflet?

I want to clip a raster layer inside Leaflet. I want it to clip by a GeoJSON. I couldn't find an effective method to do it. The below code is what I have done so far. Can anyone suggest a method? var ...
Hasitha Bandara's user avatar
1 vote
0 answers
68 views

Loading local GeoJSON file into Leaflet [closed]

I have an issue with loading a local GeoJSON file into a simple Leaflet map. I followed the answer from Loading external GeoJSON file into Leaflet map?: I included the path to the leaflet.ajax.min.js ...
Pawel's user avatar
  • 358
0 votes
1 answer
16 views

Can't use fit() in OpenLayers

I am trying to display a map of the USA in OpenLayers, and am trying to fit it to a layer. I tried map.getView().fit(Usa.getSource().getExtent()); but that didn't do anything. I thought that maybe the ...
teop's user avatar
  • 13
1 vote
1 answer
54 views

Extract fetaure from GeoJSON layer and submit it to turf.js function in Leaflet

A Leaflet layer holds some objects and each one has a bindpopup enabled, now I can't pass a single of these objects to a turf function (in that case, buffer). I know I have to translate this single ...
Vincent Dc's user avatar
1 vote
1 answer
80 views

OpenLayers - Displaying Multipolygons with holes

So I've been using the Draw interaction in OpenLayers version 7.4.2 and also 16.15.1 to create mostly Polygons and Multipolygons. I have also used the library ol-ext and it's DrawHole interaction to ...
Gladr's user avatar
  • 15
1 vote
1 answer
46 views

How to filter GeoJSON features with bbox condition in OpenLayers

I want to filter GeoJSON features with bbox condition in OpenLayers 7, so I coded like this: const geojson = (Some GeoJSON definition); const projection = (Some projection definition); const ...
kochizufan's user avatar
1 vote
3 answers
177 views

Isolating the intersecting polygon where all polygons intersect in Python with the shapely library

New to working with shapely and I'm trying to find the intersection of multiple polygons where all (or as many as possible) intersect at a single point to produce a single polygon as below: The ...
Tom's user avatar
  • 11
2 votes
1 answer
390 views

"DeprecationWarning: QgsVectorFileWriter.writeAsVectorFormat() is deprecated" when exporting GeoJSON in QGIS

I am trying to export a layer same to like this question: https://gis.stackexchange.com/a/435753/215676 But the difference is I'd like to do it in PyQGIS with QgsVectorFileWriter. Is there a way to ...
Ali Güvenaltın's user avatar
1 vote
1 answer
48 views

Reproject VectorSource (or VectorLayer) in OpenLayers 7?

I create the VectorLayer on OpenLayers 7 from GeoJSON: const geojson = "..."; const style = {...}; const vectorSource = new VectorSource({ features: new GeoJSON().readFeatures(geojson, { ...
kochizufan's user avatar
4 votes
1 answer
90 views

Convert OSM XML file to GeoJSON yields nothing

I am very new to the map making world and I am trying to extract a body of water using OpenStreetMap, convert the XML file to a GeoJSON file so that I can upload it to Datawrapper. This is the file I ...
meg's user avatar
  • 41
3 votes
0 answers
72 views

Split an array of GeoJSON linestrings (from Overpass Turbo) into an array of road intersections

I've got a query that pulls in a bbox of GeoJSON LineStrings representing roads from the Overpass Turbo API. I'm working in Typescript and have been using the TurfJS library extensively. I want to ...
yellow-saint's user avatar

1
2 3 4 5
52