Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
19 views

Finding if Long-Lat coordinate falls under a specific region in ArcGIS Online map [closed]

I am very new to this. I am working with this map: Poverty & Disadvantaged Census Tracts I have a collection of longitude and latitude coordinates and I am trying to check if they intersect one of ...
  • 11
0 votes
0 answers
22 views

H3 Hexagon Geometry join on MSA Geometry

I have a pandas DataFrame with h3 hex ids and corresponding Polygon geometries and a geojson file with Texas Metro Area Geometries. I'd like to join the H3 hex ID to Metro area and identify which ...
  • 453
0 votes
0 answers
19 views

Geometry extraction from osm.pbf file using relation id with ogr2ogr

What works If I need a GeoJSON file with the OpenStreetMap borders of Liechtenstein, I download liechtenstein-latest.osm.pbf from GeoFabrik: curl https://download.geofabrik.de/europe/liechtenstein-...
0 votes
1 answer
52 views

Displaying outline of municipalities where wind turbines are located

With this query, I get the outline of the department of Yonne in France and the points representing the wind turbines. I would also like to obtain the outline of the municipalities where the wind ...
2 votes
0 answers
45 views

How receive one-piece polygon from OSM Relation with overpass API

How I can receive Polygon one-piece from OSM using Overpass API. When I used simple query like a: [out:json]; rel['ISO3166-1'='PL']; out geom; I got on map polygon of country Poland, but when I ...
0 votes
1 answer
41 views

Clipping a raster with a multipolygon using rasterio in Python

I'm trying to write a function to clip rasters by a multi-polygon shapefile or GeoJSON in Python using rasterio. So far, I found a good article that I've implemented, but it doesn't seem to work on ...
  • 201
0 votes
0 answers
36 views

Get GeoJSON files hosted on AWS S3 to work in Leaflet inside JavaScript

Is there a way to call an AWS GeoJSON file from leaflet and not get CORS errors? I took the advice of putting "var Flight =" at the beginning of a GeoJSON file and saving it as JavaScript. ...
  • 828
0 votes
0 answers
7 views

Error while importing shapefile data using LayerMapping in GeoDjango

I am facing an issue while importing shapefile data using LayerMapping in GeoDjango. I have defined a model Province with two fields - province_name and province_shapefile. The province_shapefile ...
0 votes
0 answers
29 views

Projection Transformation from ArcGIS Pro to GeoJSON

I have a dataset with points in a layer viewable in ArcGIS Pro where all points are correctly placed on the map. When I export the attribute table to Excel, the data looks like this: Year Country ...
  • 101
1 vote
0 answers
84 views

Extracting elements plotted on OpenStreetMap canvas

I found a very nice website with eclipse maps, which example can be found here: http://ytliu.epizy.com/eclipse/solar_eclipse_interactiveMap.html?ybeg=2001&ind=55&dT=69.49500924568443&k2=...
  • 3,757
1 vote
1 answer
16 views

Geotools GeoJSONWriter setEncodeFeatureCollectionCRS not giving any output

I have a very simple Test Class where I try to parse a simple Shapefile (just a few points) to a GeoJson. public class ShapefileToGeoJSON { public static void test() throws IOException { /...
0 votes
0 answers
41 views

Export attribute data with GeoJSON in QGIS

I'm trying to create .geojson files that contain basic tracks and waypoints to be used in Leaflet. I am able to export .geojson file from QGIS and display it on a Leaflet map. However, the exported ...
3 votes
1 answer
69 views

How to apply the Four Colour theorem on GeoJSON feature collection with Leaflet

Imagine you have a GeoJSON feature collection of adjacent colored polygons presented in a Leaflet map; in the present case the parishes of the city of Lisbon fetch('https://geoapi.pt/municipio/lisboa/...
0 votes
0 answers
36 views

LayerSwitcher from OpenLayers doesn't appear

I have 3 layers, which 2 layers are from 2 geojson and 1 layer is OpenStreetMap basemap. 2 layers consider of BusRoutes (have 21 classes from "nama" field) and BusStops (have five classes ...
  • 3
1 vote
0 answers
42 views

Add extra info to the GeoJSON `features` from a Folium choropleth map with multiple feature groups

When I make a single Folium choropleth map, I often add data from my data DF to the GeoJSON data, so it can be displayed with the folium.GeoJsonTooltip(). My code looks like this: map_data_lookup = ...
0 votes
0 answers
35 views

Folium Choropleth Maps -- when do I need "geojson" parameter b/f .add_to(map)

Normally, when I create a choropleth map with Folium, at the end of the folium.Choropleth() call, I just .add_to(map): folium.Choropleth().add_to(m) I've been trying to create a map with multiple ...
0 votes
0 answers
41 views

Folium choropleth maps in layers lose scale - how to fix?

How can I get the scale/legend to display? I can get Folium to produce choropleth maps individually; they always include the scale and legend. I've also figured out how to get them grouped into ...
0 votes
0 answers
14 views

Sentinel2 Level2A Tile Coordinates are wrong, only simple box, doesn't represent no-data shape

For some Sentinel2 L2A tiles, the geometry/coordinate meta data is a simple box and doesn't describe the actual bounds of the tile, for example tile ...
1 vote
1 answer
60 views

Use data from JSON file with Leaflet GeoJSON marker

I have a JSON file that I am fetching from and I would like to use the 'LAT' and 'LON' attribute to place markers. The problem is I am unable to see any markers appear. I think it's because the file ...
  • 65
0 votes
1 answer
33 views

Adding Pop-up feature in OpenLayers WebGIS

I have some problems with popups in OpenLayers, where the popup didn't show up. I'm using Geojson for 2 vector layers, and I want only to show the column "Route, Ramp, and Canopy" for the ...
  • 3
1 vote
1 answer
63 views

Adding names or labels to the Voronoi polygons obtained from shapely.voronoi_polygons

I currently have a dataset in CSV format with around a thousand points, each has a name, latitude and longitude, I'm using those make some Voronoi polygons which in turn I'll later plot on a folium ...
1 vote
0 answers
18 views

gdal2tiles finding unexpected state either way this GeoJSON is formatted [closed]

I am using gdal2tiles with a GeoJSON file to process. It is giving the following errors when trying to process the file below : ERROR 1: At line 29, character 16: Unexpected state: ',' or ']' ...
  • 222
0 votes
1 answer
35 views

Why do I get array of features after click on one feature in OpenLayers?

There is a geojson: { "features": [ { "id": "f6105acf-065e-499b-b23d-85298dd84108", "geometry": { "coordinates": [ ...
0 votes
0 answers
74 views

Transfer GeoJSON data to a MySQL database

I want to transfer my GeoJSON data to a MySQL database. I know that MySQL somehow supports GeoJSON but I do not really understand how that works. That was my try: SET @point_o_from_geoJSON := ...
0 votes
1 answer
34 views

Converting Geojson with utm values to latlon (To display in Cesium)

I have a GeoJson with coordinate fields which seem to be in UTM: [3840346.36141685, 3270002.87814633] My final goal is to be able to load them correctly using Cesium. To do that, it seems I need to ...
  • 21
1 vote
1 answer
96 views

PHP library to get center of the polygon center

I have the folloging example GeoJSON data stored in a PostgreSQL PostGIS database: {"geoJSON":{"type":"Feature","properties":[],"geometry":{"type&...
  • 123
0 votes
1 answer
27 views

OpenLayer's VectorSource only adding first feature of array

I'm working on an angular implementation of OpenLayers: the component receives a Map instance and a Feature[] observable. The component attaches the Map instance to the view and after doing so, it ...
0 votes
1 answer
23 views

Extracting vector attributes and inserting them into Pop-ups in OpenLayers

I am slowly getting to grips with OpenLayers v4.6.5 - I have pop-ups which pop-up - but now I'm attempting to get information into the pop-ups. Here is the code I am using - I have vector items on my ...
5 votes
1 answer
109 views

Unable to remove GeoJSON features/layer in Leaflet

I am able to select a decal and display the GeoJSON on the map. Once I select another decal from the select dropdown it shows the new GeoJSON shape but doesn't remove the old ones. I've tried multiple ...
  • 65
1 vote
1 answer
92 views

Convert ESRI JS Graphic geometry into WKT format

I am drawing an object on map and retrieving it's geometry using following code: this.draw = new SketchViewModel({ layer: this.drawLayer, view: this.view }); this.draw.on("create", function(...
  • 447
1 vote
1 answer
41 views

Create layer from an array of geometries in OpenLayers?

After a fetch from a PostgreSQL view, I get a response and extract the geometries in an array of object result. .then(rep => rep.json()) .then(tableauObjOpe => { for (const ope of ...
  • 1,164
1 vote
1 answer
39 views

ogr2ogr SQLite and json_each, filtering using WHERE does not work

using ogr2ogr I want to process a geojson file that has a JSON field (see minimal file below). I tried the following command to extract the description corresponding to group a from the JSON field: ...
1 vote
1 answer
64 views

Get GeoJSON feature from a promise response in OpenLayers?

Openlayers 6.3.5 I am using an APIRest and a promise to request a PostgreSQL database : const test = fetch(`http://...`) .then(rep => rep.json()) .then(ope => { //ope in GeoJSON ...
  • 1,164
0 votes
1 answer
28 views

Does MultiPolygon support Altitude?

I have a GeoJSON of type MultiPolygon that includes altitudes. When loading it with Earth Engine (ee.FeatureCollection), I receive an error, that the Geometry is invalid. The underlying code suggests ...
  • 103
0 votes
2 answers
247 views

Shapely import and to_geojson()

I am attempting to convert a shapely LineString to GeoJSON. According to the Shapely documentation, there is a method called shapely.to_geojson() which should be able to do this. However, when I try ...
  • 339
4 votes
1 answer
74 views

Crossing lines when displaying multilinestring from GeoJSON in Leaflet

I'm stuck with something simple. I'm trying to draw a multilinestring from a GeoJSON file in a Leaflet map. I've taken the GeoJSON data from an application (built with OpenLayers + GeoServer), which ...
0 votes
0 answers
13 views

How To Iterate Over Features, Create GeoJSON Object, And Download Stringified GeoJSON [duplicate]

I have a bit of confusion regarding my previous post (Convert HMTL Maps to GeoJSON/JSON data) I'm here to ask how to iterate and download geojson from it. HTML code is as follows : https://pastebin....
1 vote
0 answers
21 views

Is it possible to convert GML to GeoJSON [duplicate]

This is an example generated by GeoServer. <wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis....
  • 41
1 vote
1 answer
75 views

Convert HMTL Maps to GeoJSON/JSON data

I have an HTML file here, but I don't know how to extract the coordinate data into a GeoJSON or shapefile. Is there a quick way to get it? Link : https://codeshare.io/DZEwnO ... function myMap() { ....
0 votes
1 answer
161 views

Getting GeoJSON data from Google Map lines

Can I get the GeoJSON data from this Subway line on Google Maps?
2 votes
1 answer
250 views

Add a fill pattern to feature style instead of a fill color on a certain condition in Leaflet

As a continuation to Hatch polygons in Leaflet I'm using Vue and Quasar but I would love to see any type of example. What I have is statestyleCDC(feature) { return { fillColor: this....
  • 131
0 votes
0 answers
48 views

Translate GeoJSON tile coordinates to X,Y coordinates on canvas 500 by 500

I have GeoJSON vector tile which I want to render to HTML canvas 500 by 500. How can I translate the lat, lon coordinates of a line string to X,Y points on the canvas? { "type": "...
0 votes
0 answers
32 views

Extracting inner rings of polygon creates falsy geojson

This is a follow up question to this question. I created a JSFiddle with various input geometries, which can be found here What I basically need is turf's mask to work with any number of interior and ...
  • 3,288
1 vote
0 answers
173 views

Visualize uber h3 hexagon in Power BI

I have two columns. One is h3 index and other is quantifying column. I have converted each hexagon into WKT. I am not sure how I can display hexagons over a map in Power BI.
3 votes
1 answer
122 views

Inserting polygon as GeoJSON in PostGIS with only boundry coordinates

I am trying to insert GeoJSON polygon features into a PostGIS DB. The input coordinate points are only the left-top corner and the bottom right corner. I have tried to use the ST_MakeEnvelope, but it ...
  • 135
1 vote
0 answers
146 views

Expose list of GeoJSON through REST API in a Java Spring Boot project

We need to expose APIs which would list uploaded GeoJSONS at S3 bucket for a particular user. I plan to take below steps Storing all GeoJSONs to S3 bucket As USER logs in Read his GeoJSONs from S3 ...
0 votes
0 answers
27 views

PyQGIS - importing features selected by location from online GeoJSON file

There is a large GeoJSON file stored online with thousands of geometries and I have created and stored a simple polygon .shp file that is the area of interest. Is there a way to use PyQGIS to import ...
  • 504
0 votes
0 answers
108 views

How to add GeoJSON file to Leaflet map

I am new to JavaScript, HTML, and Leaflet. I would like to add a polygon to my Leaflet map. Here is where I store the file. I want to use this file and don't want to add thousands of coordinates to my ...
2 votes
1 answer
144 views

How to use Turf mask when Polygon has islands in inner rings/inner rings

I am getting some weird result with turf.mask(). This is the polygon I am trying to run the mask() function with: https://gist.githubusercontent.com/Stophface/50155878441205412001247878f58b63/raw/...
  • 3,288
2 votes
1 answer
92 views

Problem with displaying GeoJSON in EPSG:3575 projection in Leaflet

In the EPSG:3575 projection in the Leaflet, all settings are identical, but GeoJSONs are displayed differently for different rasters. For rasters, the difference is only in the size of the tiles. The ...

1
2 3 4 5
51