geojson

How to apply a filter and mesh to a D3 Choropleth

你离开我真会死。 提交于 2019-12-20 04:23:48
问题 I'm working with a variation of Bostock's Quantile Choropleth. I've have successfully scaled the projection and integrated my own data. I am also currently filtering the json counties data to only include county ids starting with the state id of 48. It all works perfectly, however, I still need to apply the .mesh function to combine the arcs between bordering counties. Otherwise, when I add a hover affect I get strangely uneven borders. I tried replacing the data call with a datum(mesh) call

Pandas DataFrame.apply: create new column with data from two columns

旧城冷巷雨未停 提交于 2019-12-20 03:48:07
问题 I have a DataFrame (df) like this: PointID Time geojson ---- ---- ---- 36F 2016-04-01T03:52:30 {'type': 'Point', 'coordinates': [3.961389, 43.123]} 36G 2016-04-01T03:52:50 {'type': 'Point', 'coordinates': [3.543234, 43.789]} The geojson column contains data in geoJSON format (esentially, a Python dict). I want to create a new column in geoJSON format, which includes the time coordinate. In other words, I want to inject the time information into the geoJSON info. For a single value, I can

mapbox 聚合图

落爺英雄遲暮 提交于 2019-12-19 21:54:47
话不多说先看效果图 要实现的功能就是按照根据省份展示出各省上传的数据量 首先我们可以查看 mapboxgl官网有一个例子地址如下: https://docs.mapbox.com/mapbox-gl-js/example/cluster/ 可以复制过来直接查看是否有聚合图 是这样的之后我想把数据的颜色变得有些透明的颜色,将字体的颜色改成白色的 https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers-circle 这个链接就是修改circle样式的, mapboxgl.accessToken = '<your access token here>';; var map = new mapboxgl.Map({ container: "map", style: "mapbox://styles/mapbox/streets-v11", center: [-65.017, -16.457], zoom: 5 }); map.on("load", function() { // 从GeoJSON数据添加一个新的源并设置“cluster”选项为true。GL-JS将把point_count属性添加到源数据中。 map.addSource("earthquakes", { type: "geojson", data: "https:/

google maps api real time updates with new geojson files

纵然是瞬间 提交于 2019-12-19 11:25:07
问题 I would like to add the real time dynamic to my map, by means of passing a new local geojson file about every 3 minutes. What is the best approach to do this so that it is seamless to the end-user. I am thinking ajax and or setinterval function is the answer, but I'm not sure where to begin. If anyone knows of any examples or can offer some advice. I would greatly appreciate it. Thank you. Here is my attempt to use AJAX. I am unable to loop over the geoJSON structure. Not sure what i ma doing

Creating Infowindows on features loaded via loadGeoJson()

北城以北 提交于 2019-12-18 12:25:02
问题 I apologize if this is basic, but I have very limited javascript knowledge. I'm making a map that loads GeoJSON data that I created in ArcGIS reformatted to GeoJSON using ogr2ogr. I've got the map loading and showing the point markers from my GeoJSON file, and I've even got a styleFeature() function to set styling on the features based on their properties. The problem I'm having is trying to have infowindows pop up when a point feature is clicked on. I have successfully used the code to set a

How/Where do I get geoJSON data for states, provinces, and administrative regions of non-US countries?

吃可爱长大的小学妹 提交于 2019-12-18 09:59:35
问题 I need geoJSON formatted paths for states, provinces, and regions within multiple countries. Most readily available geoJSON data is for US states and country level boundaries, not regions within the country. This geoJSON will be used to create a geographic visualization using D3.js. 回答1: This process is now simplified (July 2014) compared to the steps I see in the accepted answer. It now seems much easier to get this data. I at first floundered around the web hoping I could just download a

Mapbox Driving Direction with Custom Marker

[亡魂溺海] 提交于 2019-12-18 09:24:29
问题 I have the following code to use mapbox as my driving direction, but unfortunately it doesn't allow me to change the markers, and it keeps using its default marker even though I try to change it with geoJson <script> L.mapbox.accessToken = 'pk.eyJ1IjoiZmFyc2hpZGFsYXZpIiwiYSI6ImNpZjNmNTRrYzQ0b2xzNWx1bXN5MnlmdjUifQ.IvZZfdiPe4rxQNolE88fhg'; var __journey = {"logbook":"29","consumer":"732","account":"1","category":"13","source":"2","platform":"4","vehicle":"25","label":"Farshid","startingodometer

Cannot update .geojson file for app submission on App Store

ε祈祈猫儿з 提交于 2019-12-18 07:09:14
问题 My GeoJSON file is supposed to cover the entire world. Here is the GeoJSON file: { "type": "MultiPolygon", "coordinates": [ [[[-169.4,58.8], [-168.0,83.4], [188.4,83.3], [194.0,-72.8], [-166.6,-73.6], [-169.4,58.8]]] ] } The name of the file is example.GeoJSON . I keep getting the following error when uploading the file: Your routing app coverage file is invalid. For more information see the Developer Guide. What is wrong with the above file? My app has a mapkit that shows the annotation of a

Shapefile to Topojson conversion

核能气质少年 提交于 2019-12-18 07:02:08
问题 I am trying to convert the Ghana admin1 shapefile that can be found here. My end goal is to obtain a TopoJSON as described in this question. I have used this command on a Linux machine: ogr2ogr -f GeoJSON GHA_adm1.json GHA_adm1.shp And it returns this: Unable to open datasource `GHA_adm1.shp' with the following drivers. ... here goes a long list of drivers... I am I doing something wrong? Should I install other "drivers"? But how? Thanks. 回答1: Download the GIS source GADM is the perfect

Shapefile to Topojson conversion

ぃ、小莉子 提交于 2019-12-18 07:01:21
问题 I am trying to convert the Ghana admin1 shapefile that can be found here. My end goal is to obtain a TopoJSON as described in this question. I have used this command on a Linux machine: ogr2ogr -f GeoJSON GHA_adm1.json GHA_adm1.shp And it returns this: Unable to open datasource `GHA_adm1.shp' with the following drivers. ... here goes a long list of drivers... I am I doing something wrong? Should I install other "drivers"? But how? Thanks. 回答1: Download the GIS source GADM is the perfect