geojson

Convert Geo json with nested lists to pandas dataframe

梦想与她 提交于 2019-12-13 15:03:44
问题 I've a massive geo json in this form: {'features': [{'properties': {'MARKET': 'Albany', 'geometry': {'coordinates': [[[-74.264948, 42.419877, 0], [-74.262041, 42.425856, 0], [-74.261175, 42.427631, 0], [-74.260384, 42.429253, 0]]], 'type': 'Polygon'}}}, {'properties': {'MARKET': 'Albany', 'geometry': {'coordinates': [[[-73.929627, 42.078788, 0], [-73.929114, 42.081658, 0]]], 'type': 'Polygon'}}}, {'properties': {'MARKET': 'Albuquerque', 'geometry': {'coordinates': [[[-74.769198, 43.114089, 0]

d3 line and points on map from csv data

南笙酒味 提交于 2019-12-13 12:11:51
问题 I am trying to plot individual data points and also a line path that runs between these points like this example D3 stop and restart transition along path to allow click through to geo data coordinates that I have been helped with before. Now I want to use my actual data rather than a test set of coordinates but am running into trouble. I have tried both a geoJson file and also csv for my data. I am using a csv file with lon and lat for the points and was hoping to make the line from that

Insert/Update PostGis Geometry with Sequelize ORM

牧云@^-^@ 提交于 2019-12-13 12:08:36
问题 I have extracted models of some PostGis layers with sequelize-auto, giving: module.exports = function(sequelize, DataTypes) { return sequelize.define('table', { id: { type: DataTypes.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true }, geom: { type: DataTypes.GEOMETRY('POINT', 4326), allowNull: true, }, ... On GET sequelize sends the geom to the client as GeoJSON: { "type":"Point", "coordinates":[11.92164103734465,57.67219297300486] } When I try to save this back PosGis errors

Google Maps API GeoJSON not working with IE 11, but works in Chrome

给你一囗甜甜゛ 提交于 2019-12-13 08:30:43
问题 I have a google map that loads markers from a GeoJSON file that runs on localhost in Visual Studio 2013. It also runs in chrome (from an IIS server) but will not run in IE version 11. The map shows up, but the markers from the JSON file do not. Why would this work in Chrome on IIS 8, and IE 11 through VS, but not IE 11 on IIS 8? var map; var infowindow = new google.maps.InfoWindow({ }); function initialize() { map = new google.maps.Map(document.getElementById('googleMap'), { center: new

How can I nest GeoJSON / TopoJSON geometries OR nest the generated paths with D3?

不羁岁月 提交于 2019-12-13 07:58:26
问题 Problem: I'm attempting to create an interactive map of the US in which state, county and national boundaries are displayed. Counties are shaded based on data, and hovering over a state should highlight all counties in the state, and the state should be clickable. I want to achieve this by having a SVG with the county shapes inside of state shapes, inside of a US shape. I can generate a county map based on a CENSUS county shape file, and I can shade the states based on data in an external CSV

Mapbox: The list does not work when I try to change the lat/long of the geojson objects

可紊 提交于 2019-12-13 07:29:08
问题 I tried out this code and it works perfectly, until I try to change the position of the markers. For example, in the geojson array, I changed the first variable's properties and when i click it on the list, it only shows the marker (no map). Could anyone see what the issue might be?? Here is the code: http://plnkr.co/edit/ohumVwCE0CqcZOIkzPTa?p=preview var geojson = [{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 34

Mapbox markers from geoJSON not appearing in IE9

天大地大妈咪最大 提交于 2019-12-13 04:52:34
问题 I have a map that is loading markers from a local geoJSON file. This works fine in all browsers I have tested (FF, Chrome, Safari, Opera, IE10, IE11) but not in IE9. I added a marker to the map without geoJSON (the yellow bus marker) which does show up fine in IE9. Here is the relevant code: // set up mapbox var map = new L.mapbox.map('map', '########', { tileLayer: { detectRetina: true, minZoom: 2 }, zoomControl: false }); // marker without geoJSON L.marker([-37.9, -77], { icon: L.mapbox

Openlayers: select a feature programmatically from GeoJson

旧街凉风 提交于 2019-12-13 04:42:51
问题 I am working on a project that uses openlayers (version2.14)to display a Bing layer(GeoJSON format), I have no problem reading the GeoJSON and display features, but I want to select a feature programmatically, for example, there is a table displaying all the features attributes(GeoJSON format.sample: {"type": "FeatureCollection", "features": [ {"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-7923751.4232522,5233536.7371399]},"crs":{"type":"name","properties":{"name

Trying to convert kml to geojson and getting ArrayIndexOutOfBoundsException with geotools

回眸只為那壹抹淺笑 提交于 2019-12-13 04:16:54
问题 I am trying to convert a kml to geojson with geotools 20.5 and i am getting ArrayIndexOutOfBoundsException. The file i am trying to convert can be converted on other frameworks correctly but on geotools i had this error. I am using geotools 20.5 and java 8. Can someone help me? My code: try { reader = new FileInputStream("file.kml"); PullParser parser = new PullParser(new KMLConfiguration(), reader, SimpleFeature.class); FeatureJSON fjson = new FeatureJSON(); FileWriter tmp = new FileWriter(

Do any one know about this Error in python? how can I resolve this?

僤鯓⒐⒋嵵緔 提交于 2019-12-13 03:59:41
问题 I am plotting the data with MapBoxGl Python Library on maps, here is my code which is taking the latitude, longitude and points from the Pandas DataFrame and trying to make the geojson, here is the code data4 = df_to_geojson(result, properties= ['speed'], lat='lat', lon='lon') print (data4) but I am getting this error, I am not familiar with the error, I looked for it but didn't find any solution: > --------------------------------------------------------------------------- ValueError