Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
2
votes
0answers
50 views

Add altitude coordinates in Feature Collection then serialize to GeoJSON

I deserialized a GeoJSON file into a feature collection using GeoJson.Net. Then I get the feature from the feature collection. Inside the feature I can loop and get all the type of geometry. From ...
0
votes
1answer
239 views

Is there a way to add custom ids to Leaflet markers derived from a GeoJSON file?

I'm fairly new to JavaScript and I'm currently trying to connect each of my Leaflet markers to a certain portion of text in another div so that when a user clicks the marker, the site will auto scroll ...
0
votes
0answers
43 views

Classifying a GeoJSON LineString type file based on Strahler Order with Python

I am working on a Python project working with a GeoJSON file (Linestring type). The aim of this project is to classify lines based on Strahler Order (Wikipedia : https://en.wikipedia.org/wiki/...
0
votes
0answers
25 views

Python API For Generating GeoJSON or WKT From Interactive Map

I am looking for a Python API for generating GeoJSON or WKT interactively using a GUI based map interface. I have fun some website where one can generate the WKT polygon using by drawing a polygon ...
2
votes
0answers
72 views

Using GeoJSON Services in Arcade Expression

I am trying to use an Arcade expression with GeoJSON services in a map using the ArcGIS Javascript API. The intent of the Arcade expression is to return a count of lakes that intersect a county that ...
1
vote
4answers
82 views

Access specific feature property in local GeoJSON file?

I am working with a GeoJSON feature collection file. It has >100 features, each feature has a set of coordinates labelled "geometry" and a set of characteristics labelled "properties&...
0
votes
0answers
110 views

Merging multiple GeoJSON files into one file with layers

What is the best way to merge several GeoJSON files of different types into a single GeoJSON but where each original GeoJSON is its own data layer within the final output? Been playing with QGIS and ...
1
vote
0answers
25 views

Cut NetCDF files by shapefile [duplicate]

I have a large dataset of global .nc files and I am trying to clip them to a smaller area. I have this area stored as a .shp file. I have tried using GDAL from QGIS but needs to do this by converting ...
1
vote
0answers
30 views

How do I load a CBG GeoJSON into Python for Census Block Group level maps in Plotly?

I made county level maps a while ago and I'm trying to modify it to CBG level. Am I limited to state and county? with open('cbg.geojson') as response: cbgfile = json.load(response) data = pd....
-1
votes
1answer
60 views

GeoJSON to masks [closed]

I need to use the GeoJSON file and TIFF images to produce masks. Is there a Python program that takes GeoJSON file and TIFF image as input and produces masks?
1
vote
0answers
31 views

QGIS refresh layer at interval

I am trying to understand the behavior of Layer->Render-> Refresh layer at interval in QGIS I sat up a flask rest api which serves a geojson. I added the geojson to QGIS via Add Layer-> a. ...
0
votes
0answers
24 views

How to translate from GeoJSON to GeoDataFrame [duplicate]

I want to convert GeoJSON into a GeoDataFrame, but it doesn't work. GeoJSON is stored in a dictionary variable. If you know of a solution, I would like to know how to solve this problem. This is my ...
0
votes
1answer
178 views

Calculating distance between two Linestring using Python

I have two linestring, each linestring represents a rail road. I am trying to calculate minimum distance between these two linestrings. Which function is efficient to do this? I have only come across ...
3
votes
1answer
164 views

Generate GeoJSON tile layers from Shapefile

I have some vector layers in a shapefile that I would like to display in the Google Maps Javascript API. I recently learned that you can generate GeoJSON from shapefiles in the correct CRS using QGIS: ...
0
votes
0answers
38 views

Measurement tool of QGIS working in unsaved project but disabled in saved project

The measurement tool of QGIS 3.8 is working in the unsaved project but disabled in the saved project. I unable change the measurements or the units, and the Units dialog box is grayed out. However, ...
1
vote
1answer
63 views

Combine multiple points to polygons by property

I'm working on a website with a Cesium map, and I'm using turf.js for geo calculations. I need to find a way to merge a large set of points on the map (with a fixed distance between them) to polygons, ...
0
votes
0answers
26 views

Saving layer identification metadata after export using QGIS

I have set some identification metadata like Identifier, Parent Identifier, Title and Type in a layer in QGIS and when I export the layer this changes have disappeared. How can I solve this? I need to ...
1
vote
2answers
68 views

What coordinate system is this? How can I project it to WGS84 (lat-long) system in Python?

I had an AutoCAD drawing of a floor plan. I imported it to python using Fiona and checked the metadata. The CRS is empty. When I checked the coordinates for the geometry, it was in the following form, ...
1
vote
0answers
34 views

How to save a GeoJSON layer with the select option for the items in a field in QGIS

I have a GeoJSON layers with many items. If you open the attribute table you can select an option in one field clicking over the field and the choosing one of the displayed options. The problem is ...
1
vote
1answer
78 views

How to keep feature ID within GeoJSON ogr2ogr import to PostGIS

I'm attempting to import a GeoJSON file into PostGIS using ogr2ogr The basic command is ogr2ogr -f "PostgreSQL" PG:"dbname=my_db user=postgres" my_file.geojson -preserve_fid -nln ...
0
votes
0answers
53 views

ogr2ogr PostGIS to GeoJSON using batch file

I am trying to export a PostGIS table to GeoJSON using ogr2ogr. The following works perfectly when I launch it in Windows command : ogr2ogr -f "GeoJSON" F:\output.json PG:"host=**** ...
1
vote
0answers
35 views

Determine if two geometries are similar in shape and location

Suppose I have two geometries that have almost identical location and shape. I say almost on purpose here, since one or the other might have an extra node, or the order of coordinates in GeoJSON might ...
0
votes
1answer
45 views

Clustering markers from GeoJSON after adding data to layer in Leaflet

I am trying to add clusters in my leaflet map. I use overlayMaps which helps to choose one of the active layers, and in that case I want my marker to be a cluster. But it is not clustering. Again ...
1
vote
0answers
69 views

Reducing precision of GeoJSON

We have a large number of GeoJSON shapes that are stored in a datastore. Currently, the GeoJSON coordinates are being stored with 15 decimals, which is accurate up to picometers. We don't need that ...
1
vote
1answer
68 views

PostGIS ST_AsGeoJSON throws error

I'm inserting Open Street Map data into a PostGIS database using the GeometryBuilder of osm4j. I then fetch the data and display it on a Leaflet map using ST_AsGeoJSON. This usually works flawlessly, ...
3
votes
1answer
44 views

Python shapely unary_union in JavaScript

I have seen turf.js has union() but this isn't equal to the unary_union. Or does anyone know what the unary_union actually does? Maybe I can try to recreate it, I have seen the source code in python ...
1
vote
1answer
181 views

Cluster GeoJSON data with PruneCluster

I'm trying to create a cluster with categories using PruneCluster around my GeoJSON layers. As the example in GitHub They are creating randomly some markers then adding them to the cluster. I did the ...
1
vote
0answers
51 views

Convert a GeoJSON polygon to a Cesium.Plane object

I have a polygon (planar) in a GeoJSON feature. I would like to convert it to a true Cesium.Plane object. How could I achieve that? In my current code, the feature is only a dataSource object: const ...
1
vote
1answer
187 views

Inserting GeoJSON in PostgreSQL using laravel controller

Actually.. I have GeoJSON that I send from javascript into controller. My GeoJSON: { "type": "FeatureCollection", "features": [{ "type": "...
1
vote
0answers
43 views

Add a GeoJSON in Mapbox GL JS

I'm new to Mapbox and I want to add a GeoJSON made of polygons stored locally on my computer and I don't know how to do. I've follow the example given by Mapbox (https://docs.mapbox.com/mapbox-gl-js/...
1
vote
1answer
70 views

Changing the color of every entity of GeoJSON layer in OpenLayers 6.4.3

I would like to change the color of every entity of my GeoJSON, like in the picture. For now I can just change all the features with the same color. Here is my code: const provinceGeoJSON = new ol....
1
vote
1answer
42 views

Setting the charset with GeoTools in Java

I have a well-made geojson file. Of course it is well made with shapefiles. I want to set the charset when creating the shapefile. Below is part of the code. File outFile = new File("D:\\geojson....
0
votes
1answer
28 views

Is there a standard to construct a paginated API response for GeoJSON?

To return a paginated GeoJSON payload from an API, what is the best practice or most common convention for including page information? The pagination applies to the number of features in a feature ...
1
vote
0answers
22 views

Add prefix to properties names using ogr2ogr sqlite

I am using ogr2ogr to create a geojson file with props from sqlite Db with this ogr2ogr -f GeoJSON -sql "SELECT * FROM censusblockgroups2 shp INNER JOIN 'output-z' csv ON csv.name = shp....
0
votes
1answer
35 views

PostGIS ST_Area unexpectedly returns 0

Can someone help me understand why the following ST_Area query returns 0: SELECT ST_Area(ST_SetSRID(ST_GeomFromGeoJSON('{"type":"Polygon","coordinates":[[[-180.0,0],[180,...
1
vote
0answers
36 views

How can I fix misshaped GeoJSON polygons?

In 2018 Ghana changed its administrative divisions (from 11 to 16 regions, and from 216 to 260 districts). Unfortunately, I have not been able to find the GeoJSON (or equivalent) data for the new ...
0
votes
1answer
23 views

Convert NIFC GeoJSON daily data to KML file using GeoTools

I am not able to convert the daily NIFC GeoJSON data into KML file using GeoTools lib. I am pretty new to GIS data. Sample GeoJSON data : https://opendata.arcgis.com/datasets/...
-1
votes
1answer
48 views

Handle large point layer on client side using Leaflet/OpenLayers [closed]

I'm planning to write an web app which will display large amount of point features (approx. 120 000 features, 50mb after data cleanup). Each point will consist of only two values - coordinates and ...
3
votes
2answers
184 views

How to add source in GeoJSON layer using OpenLayers

I am trying to add GeoJSON layer using OpenLayers which is in the PostgreSQL db. When I am running query as select ST_AsGeoJson(ST_Transform(geom,900913)) as farmcode from farmdatadd where areatbl = ...
1
vote
0answers
64 views

Add Z Values to Point Coordinates

I am tracing routes from a road segments layer with the goal graphing the elevation profile of the route in JavaScript with GeoJSON. This is my "real world" hobby project to get familiar ...
0
votes
0answers
18 views

I cannot able to popup the marker from the geojson in the leaflet [duplicate]

var json1 = { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry&...
0
votes
0answers
42 views

Getting lat/lng for latest Wkid:3435, Wkid:102671 and rings

I've seen similar question as Getting lat/lng from wkid, latestwkid and x y coordinates but not sure how to put rings into ArcGIS server REST endpoint. Should I take every two coordinates and process ...
1
vote
0answers
26 views

How to split a county layer, but keep all surrounding counties per layer in QGIS

I have a shapefile of all US counties. I need to split the shapefile by county, and save in a county file in the file type GeoJSON. This makes about 3k files. That's easy. The hard part is that for ...
1
vote
1answer
96 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 ...
0
votes
0answers
27 views

Simple way to convert GeoJSON from MultiPolygon into Polygon [duplicate]

I need a GeoJSON file that simply has the coordinates of the polygons for the boundaries of the provinces of Canada. I have a GeoJSON file but it has multipolygons and my software does not support ...
0
votes
0answers
26 views

How to connect GeoJSON LineString coordinates with a shortest distance

I have the following GeoJSON LineString that I generate from some data (that I don't own). The problem is that when this line is rendered, the 2nd coordinate (with a positive longitude) of the line is ...
1
vote
1answer
66 views

GeoJSON doesn't render on Map in OpenLayers project

I seem to be stuck on a formatting issue of how OpenLayers reads the GeoJSON output I am presenting to it. In my webpage file, I have the following script: <script type="module"> var ...
1
vote
1answer
90 views

How to I recreate MultiPolygon with Rings/Holes using org.geojson

I have a few original MultiPolygons that contain holes...I would like to extract the Polygons and recreate them WOTHOUT the holes. how is this done? Original MultiPolygon. https://gist.github.com/...
1
vote
0answers
38 views

How to update my map with the restored features from JSON format?

I'm trying to implement a CRUD that have a map OpenLayers. First, I drawed and saved the features with writeFeatures(). Second, I'm trying to show the polygon that I drawed, and here is my problem: ...
1
vote
0answers
64 views

Is there a way to rasterize polygon with hatch pattern with GDAL CLI or in a Python script?

I am trying to automate some work previously done in QGIS. Target platform is AWS Lambda so there is no way to use QGIS or any other standalone GIS-specific application. QGIS provide a way to draw ...

1 2
3
4 5
44