Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
98 views

How to repeat drawing function in Leaflet

I am trying to create a Leaflet.js web map that gives users the opportunity to draw lines. this line will be sent to mapquest elevation API to be retun to the map as a GeoJSON with elevation data ...
1
vote
2answers
194 views

Mapserver GeoJSON input

Is it possible for MapServer to read GeoJSON file and serve it as a layer in the .map file? Like how it can be done with shapefiles as shown below: LAYER Name 'land' TYPE POLYGON DATA '...
0
votes
0answers
233 views

Converting L.GeoJSON Leaflet to different projection?

so I have some awesome basemap raster layers that use L.TileLayer to load, but the GeoJSON I have for my country polygons is all Web Mercator. My tile map is WGS84 or EPSG4326 (I think). But I ...
0
votes
0answers
116 views

Editing attributes of a GeoJSON in Leaflet

I have a map in which I'm trying to create the capabilities of adding new features and editing attributes of new and existing features. I have managed to make the feature editable but I want people to ...
1
vote
1answer
136 views

OpenLayers 5 and GeoJSON with two geometry attributes per feature

I have a GeoJSON file in which each feature has two geometry attributes, one is the default geometry property defined by the GeoJSON standar, and the other one is a property under the standarized ...
0
votes
0answers
56 views

Using QGIS or GRASS API in custom application

I've already read in this link that is not possibile to use QGIS or other GIS application API (GRASS, ArcGIS) without rebuild all libraries into my custom code. First I would like to know if that ...
0
votes
0answers
16 views

Android laggy map after adding vector objects

I'm using GLMap to render over 5000 vector objects in an Android Application. Here is the framework I'm using: https://getyourmap.com/ Currently, I have Shapefiles which I convert with https://...
4
votes
1answer
233 views

Saving Overpass query results to GeoJSON file with Python?

I have just started to use Python and I would like to make a query to Overpass and store the results in a geospatial format (e.g. GeoJSON). As far as I know, there is a library called overpy that ...
0
votes
0answers
25 views

Looping on GeoJSON to get maximum/minimum altitude

I need to create to create 2 function to return max and min Z/elevation/altitude values from LineString GeoJSON file. i have created 2 function to get that before, but i was using MultiLineString ...
2
votes
0answers
68 views

Increase the size of overlapping lines in QGIS 3.6

In QGIS I have a layer that is a MultiLineString that has many overlapping lines, which represent driving routes around the city which are generated using OSRM. My data looks something like [ [[a,b],...
0
votes
0answers
182 views

Creating Leaflet Heatmap using LinsString GeoJSON

I need to create heatmap based on length property from a LineString GeoJSON file. I have tried to use Leaflet.heat plug-in, but this tool accepts points not lines. here is my code: $.getJSON("data/...
1
vote
2answers
172 views

Put a label on OpenLayers from GeoJSON

I have a geojson and I want every property to put a label in its middle with a number .. Here's the function I'm putting on the geojson map: function search(){ var layer = $('#layer').val(); ...
0
votes
1answer
290 views

Converting JSON response into a GeoJSON layer in my Leaflet map

I need to convert a JSON response from Mapquest elevation API into a GeoJSON layer in my Leaflet map. var ele = $.getJSON('http://open.mapquestapi.com/elevation/v1/profile?key=<API_KEY>&...
1
vote
1answer
133 views

Leaflet: Different custom information popups for each GeoJSON polygon

I'm really new to this and I'm trying to create popups for 2 polygons which will each contain a paragraph of written information. The function I have so far differentiates between the 2 polygons by ...
0
votes
0answers
101 views

View GeoJSON data after clicking on the OpenLayers map

I'm trying to make a piece of code that when I click on the map to return GeoJSON property data that I clicked on. I tried this way: map.on('click', function(e){ //console.log(evt); //...
0
votes
1answer
46 views

Request a Ajax with GET to remove one or more geometries in OpenLayers

I have a html selection of the form: <table class="table"> <tr> <td> <label>Afiseaza:</label><br /> <select id="layer" onchange=...
0
votes
0answers
65 views

Android Library to convert ESRI Shapefiles to GeoJSON

I'm building an Android App for display ESRI Shapefiles but unfortunately, there are only a few free SDKs which support Shapefiles. Most of them working with GeoJSON, so now I'm looking for an Android ...
0
votes
1answer
43 views

Loading GeoJSON by AJAX method in OpenLayers, centering the map automatically

I'm trying to center the map on the geometries that are on the map. To encompass all but until now I have not succeeded in how ... It centers further than geometries :( if (ol.proj.proj4 &&...
0
votes
1answer
136 views

Find index of Linestring element at feature, when hovering - openlayers/GeoJson

I have a Geo-JSON Linestring, this is drawn by 800 elements in OpenLayers 4.6.5. I'am trying to use the map.forEachFeatureAtPixel, and print a pop-up when hovering for individual elements on the ...
0
votes
1answer
250 views

Search plugin of Folium doesn't appear [closed]

I'm trying to reproduce the following jupyter notebook : https://nbviewer.jupyter.org/github/jtbaker/folium/blob/geojsonmarker/examples/plugin-Search.ipynb But once I'm trying to create the map I ...
0
votes
0answers
127 views

Leaflet custom icons and popups showing GeoJSON properties with external data?

How can both custom icons and geojson properties be implemented with external geojson in Leaflet? Using methods described in answers to two other questions, both using inline geoJSON: Using custom ...
1
vote
2answers
150 views

Executing functions after multiple data sources have been loaded in Leaflet AJAX

I have a leaflet map that takes in data from multiple sources via the LeafLet Ajax plugin. I want to execute certain functions only after ALL the data has been loaded, not just one layer. The data ...
0
votes
1answer
190 views

Calculating gained elevation on GeoJSON

I need to calculate gained elevation on Multilines GeoJSON files in a Leaflet.js map. Is there is any plug-in to do that? My GeoJSON files contains Z/elevation data in geometry.
0
votes
1answer
436 views

Convert GeoJSON object to bounding box using Python 3.6

Is there a library available in Python 3.6 using which I could convert a GeoJSON object (geometry) into a bounding box object? Actually I am calling a WMS layer from GeoServer and I want to set the ...
0
votes
0answers
102 views

Getting Details of POI

I am pretty new with this so please bear with me. I am able to extract GeoJSON data from OSM and Load it into MongoDB. I am able to run queries to get the data based on Radius. The data looks ...
1
vote
2answers
83 views

Getting hightest and lowest points

I have GeoJSON files that contains altitude values. I have used these GeoJSON files to be shown on leaflet.js web map. I need to show values of highest and lowest point in two divs when I clicking on ...
1
vote
1answer
171 views

CORS issue loading an external local GeoJSON into OpenLlayers 5

I have a local folder on my network with my HTML file and two subfolders, one with the downloaded folder from OpenLayers (renamed ol) and the other with my GeoJSON file (data). When I try to load the ...
0
votes
3answers
1k views

Filtering interactive leaflet-map with dropdown-menu?

I try to set up a filterable "shot chart" like http://graphics.latimes.com/kobe-every-shot-ever/ with leaflet. I've a geojson file thats stores all the shots data, I've them showing up in a layer. ...
0
votes
1answer
176 views

Select a feature by property

I have a GeoJSON layer with continents info (got it from here), and I want to select a feature(continent) based on its name value or "CONTINENT" in this case. I did some research and ended up with ...
1
vote
1answer
84 views

How can I get GeoJSON from Esri software to load in Leaflet?

So I am trying to take a GeoJSON file that I have generated from an Esri shapefile in ArcGIS Pro, but it is not rendering on the map for some reason... The GeoJSON that was created from ArcGIS Pro is ...
0
votes
1answer
571 views

Load multipolygons from GeoJSON into GeoDjango model

I have a simple model: from django.contrib.gis.db import models class CountryShapes(models.Model): geonameid = models.PositiveIntegerField(primary_key=True) geom = models.MultiPolygonField() ...
2
votes
3answers
1k views

I'm trying to add my local GeoJSON files to my Leaflet web page

I'm quite new to JavaScript and I have been trying to add my GeoJSON files to a web page. I can't seem to figure out how to get the GeoJSON to actually load. I've checked it using GeoJson.io and it ...
0
votes
1answer
226 views

Is it possible to use SELECT ST_GeomFromText( with other SELECT? [closed]

I'm trying to use SELECT ST_GeomFromText() with a value catched from another query: SELECT ST_GeomFromText( ST_AsText( ST_GeomFromGeoJSON( SELECT column-name FROM table-name ORDER BY ...
1
vote
1answer
467 views

Converting GeoJSON to shapefile using GeoTools Java

I am implementing a web service in Java which takes a GeoJSON file as input and converts it into a shapefile. My code looks something like this :- @RequestMapping(value = "/uploadFile", method = ...
0
votes
1answer
32 views

Why is this happening? I show GeoJSON some coordinates with OpenLayers by request Ajax

I want to display a GeoJSON on OpenLayers with a request from Ajax from the database: I store in the geojson variable all the information and I icercated in two ways: 1. Directly from the already ...
2
votes
2answers
1k views

GeoJSON to KML conversion

Is it possible to convert GeoJSON to KML format using geotools. I am trying to figure out this using Java but I can get results only using node js.
3
votes
1answer
502 views

Importing GeoJSON into PostGIS with Python

I am trying to import GeoJSON file with Python to my PostgreSQL db. Here is full code: with open('C:/xampp/htdocs/app/data/'+a) as file: gj=geojson.load(file) for feature in gj['features']: geom=...
0
votes
2answers
871 views

Get GeoJSON from a database by the AJAX method for OpenLayers

I have this code: if (ol.proj.proj4 && ol.proj.proj4.register) { ol.proj.proj4.register(proj4); } var features = new ol.format.GeoJSON().readFeatures( $.ajax({...
1
vote
2answers
898 views

Create Polygon with Length, Width, and a center coordinate

Using Shapely or like library, How can I create a rectangular polygon with known Length, Width (in meters)(Drawing over EPSG: 3857), and center coordinates (EPSG: 4326)? The output needs to be in ...
0
votes
2answers
397 views

Convert GeoJSON to OSM XML using Python

I know about using ogr2ogr, and also about the nodejs module osm_geojson. However, I would like to convert GeoJSON to OSM XML from Python. Is there a library which has this capability built in? Or ...
1
vote
1answer
66 views

Using L.Control.Search and L.markerClusterGroup

I am trying to use L.Control.Search and L.markercluster to make a searchable cluster of ~4400 address points. I have tried two separate ways (based on examples I have found) but not yet been ...
0
votes
0answers
38 views

Dissolving GeoJSON with nodes and lines to one average line?

I have a GeoJSON with two layers. One with lines and one with nodes. I'd like to dissolve it (or at least the layer with the nodes) to one single line, by averaging the positions. I've looked at Turf....
0
votes
2answers
335 views

Exporting buildings and their types with Overpass

I am trying to extract all buildings in one file within a certain city (Radebeul, Sachsen, Germany) from Overpass Turbo. My query looks as follows: [out:json]; // fetch area “Radebeul” to search in ...
0
votes
1answer
103 views

Updating onEachFeature property of GeoJSON in Leaflet?

Here's my code: var eurojson = L.geoJSON( eurojson,{ onEachFeature: onEachFeature, style: EU_color }); var econjson = eurojson; econjson.setStyle(Econ); When I initialize econjson variable, I ...
0
votes
0answers
213 views

Converting TopoJSON data to GeoJSON using JavaScript in browser?

There are many articles about how convert GeoJSON to TopoJSON using JavaScript, but I could not find how to convert TopoJSON to GeoJSON in the browser. Response: Using http://d3js.org/topojson.v1....
0
votes
1answer
40 views

How can I add dynamic text/properties to a GeoJSON multipoint on each individual feature?

I'm drawing circles on a map based on lon/lat. These circles are drawn from "subarrays" in an array, e.g: myArray = [[array(18)]],[array(111)], [array(65)]....] I map each of these arrays using ...
0
votes
1answer
141 views

Coordinates remain very high when converting projections

I have this GeoJSON file which uses the following projection: EPSG:28992. I want to convert this to EPSG:3857 but I don't have GIS software available. I have tried ogre, but when I first convert it to ...
1
vote
1answer
358 views

Highlighting selected geojson feature and return to previous state when another one is selected using Leaflet?

I've a map with a geojson layer containing markers, polygons and lines. I made a module so that when a feature is clicked, its properties are displayed in a frame and not in standard Leaflet popup. ...
2
votes
1answer
281 views

How to snap to a geojson-vt layer (Vector Tile Layer)?

I'm using geojson-vt to render a large geojson (originated from OSM) file. This file contains all road from a state (extracted with overpass-turbo way[highway="*"]). I'm buinding a domain-specific ...
2
votes
2answers
452 views

GeoJSON put in the OpenLayers maps

I am a beginner in OpenLayers. I would like a GeoJSON to be displayed on the map. Can you provide me with some example code to allow me to build this small project? The GeoJSON code is: {"type":"...