geojson

Nodes as list in force layout (over a map)

佐手、 提交于 2019-12-12 01:00:09
问题 I'm building a force layout visualization on top of a leaflet map. I was able to locate some of the nodes in a specific lon and lat but now I'm having trouble with the other nodes. Right now this is what I have: https://bl.ocks.org/pierreee1/701c9cea921feec39c256af725277a12/9f48af9dba15cb3e2b0c4053f5c47d87cb79e4ba What I would like is to position those nodes like a list. Something like this: So you can click on a node if you'd like to see the links: Also, they move along with the map. Should

Only show filled attributes in leaflet popups (and not “null”-attributes)

倖福魔咒の 提交于 2019-12-12 00:44:59
问题 My leaflet map shows polygons from a GeoJSON file. This file has several attributes (attribute_1, attribute_2, etc.). However, some are filled with text and some are empty. How can I only show the attributes which are filled with text in my popup and not the empty ones? Using my code beneath every attribute is shown and if it's empty "null" is shown in the popup: // Integrate GeoJSON and style polygons $.getJSON("klimagutachten_2001.geojson",function(klimagutachten){ L.geoJson( klimagutachten

Creating an array from GeoJSON file in OpenLayers 3

南楼画角 提交于 2019-12-11 23:00:47
问题 I am using OpenLayers 3 to animate the paths of migrating animals tagged by scientists. I load the geoJSON file like so var whaleSource = new ol.source.Vector({ url: 'data/BW2205005.json', format: new ol.format.GeoJSON() }); Instead of loading this directly into a layer, I would like to use and reuse the data in the geoJSON file for different purposes throughout my program. For example, I want to pull the lat & lon coordinates into an array to manipulate them to create interpolated animated

GeoLocation API Calls against an EVE RESTful API

拟墨画扇 提交于 2019-12-11 20:37:04
问题 I easily can store geolocation Data into MongoDB with an Eve RESTful API Server running. So I store data like: loc : { lng: 13.01111, lat: 51.01111 } Validation etc. works nicely. But: I was unable to find a way to get geolocation data out of the REST API. There are sample queries over there working fine at the command-line, but there seems to be no way to query the API a appropriate way. Is there a way to throw MongoDB like Queries against the REST API or which is the prefered way to

Fast Convert of large csv to geojson

旧巷老猫 提交于 2019-12-11 19:37:24
问题 I have a csv with 6 millions of rows and i need to convert it to a geojson file. cloud solutions exists in the internet but it takes whole day to convert it. Is there a quick way to do that with python ? UPDATE OF QUESTION : i tried the solution here but i'm getting this error : ValueError Traceback (most recent call last) <ipython-input-48-0224e45ed66e> in <module>() 5 with open('Documents/neo4j-community-3.3.5/import/train.csv', newline='') as csvfile: 6 reader = csv.reader(csvfile,

Convert javascript to json?

跟風遠走 提交于 2019-12-11 17:53:26
问题 I'm working with leaflets and I've noticed that many examples use a separate js file where a variable is set to a JSON stream. How would I be able to modify the following example so that it can read off a json file with the geojson and not have the variable declaration in the javascript? The code looks like this: <script type="text/javascript"> var geoJsonData = { "type": "FeatureCollection", "features": [ { "type": "Feature", "id":"1", "properties": { "address": "2" }, "geometry": { "type":

Plot polygon using D3

假如想象 提交于 2019-12-11 15:19:56
问题 I am trying to plot a polygon using a .json file. *EDIT to add sample coordinates { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [ -0.0691250297447329, 51.5462448874379 ], [ -0.0691510961928943, 51.5459630404703 ], [ -0.0692056531364391, 51.5456827414947 ], [ -0.0692883661627076, 51.5454050640766 ], [ -0.0693070134960316, 51.545356361588 ],..... The script looks like var width = 960; var height = 600; var svg = d3.select(

Make a choropleth from a non-highmap-collection map

杀马特。学长 韩版系。学妹 提交于 2019-12-11 14:09:13
问题 I've been trying to make a choropleth map with hcmap from highcharter package; I obtained the polygons from my own shapefile because it's a map that is not on the list of highmap's collection. To do so, first I managed to transform my shapefile to a GeoJson file, as described here: https://blog.exploratory.io/creating-geojson-out-of-shapefile-in-r-40bc0005857d Later I managed to draw the map using the package geosonio as described here: http://jkunst.com/highcharter/highmaps.html#geojsonio

Using OpenLayers, how can I display different icons for different features on a single layer?

不羁岁月 提交于 2019-12-11 13:25:47
问题 firstly I'm new to Openlayers/JS as a whole and fairly inexperienced with programming in general so there might be other problems with my code that I'm not aware of. I am using the latest version of Openlayers (5.3.0). My program currently passes GeoJson formatted data via Ajax to be displayed on an Openlayers map. It creates the map, view and a layer for the features to be displayed on. When I press a "Go" button on the page, the features are loaded onto the map successfully. In my case the

No suitable constructor found for type GeoJsonPoint

雨燕双飞 提交于 2019-12-11 13:11:35
问题 Having a lot of trouble figuring out what I'm doing wrong. Sadly I had it working at one point, but can't determine what I changed that broke it. From what I understand this should be fully supported now. Object in question: @Document public class Place { public final static String URI = "/place"; @Id private String id; private String name; private String caption; private GeoJsonPoint location; public Place() {} public Place(GeoJsonPoint geoJsonPoint) { this.location = geoJsonPoint; } //