geojson

隔点预报GRIB绘制等值线矢量图问题分析(二)

試著忘記壹切 提交于 2020-08-04 11:30:08
上一次用grib 绘制等值线矢量图 https://my.oschina.net/umbrellall1/blog/4423342 时,发现绘制的时候有个严重bug,因为我绘制GeoJson图层的时候是从轻到重,所以绘制出来的图形粗略看是没问题但是通过地图描绘就看到了存在一个bug. 利用上次的代码绘制出来的图形是这个样子的: 粗略一看是没什么问题但是对比地图就会发现个问题 红色框的部分应该镂空的但是绘制出来的图片却是实体,所以问题大概是在绘制图形上面出现问题了我绘制图形采用的是Graphics2D 而 Polygon 不支持带孔的多边形 ,所以问题就来了,如何来解决这个问题? 起初我是这样想的先绘制图形最后绘制镂空的部分不就好了,于是修改了代码运行效果: 嗯?孔到是出来了 中间的点却被覆盖了?怎么回事? 我把那个空的区域绘制出来看一下 原来geoJson 这个绘制的时候也是由于不支持带孔的所以会把中间那几个区域给覆盖掉。 这条路不通啊。那如何来做呢?去网上搜索如何绘制有孔多边形,经过搜索发现 Polygon 单纯绘制不出有孔的需要通过转化Area 在通过Area的裁剪函数在来绘制就可以绘制出来 Area area = new Area(p); Area area2 = new Area(p2); area2.subtract(area) 既然可以绘制有孔的

Failed to create valid geo_shape

笑着哭i 提交于 2020-06-29 05:40:12
问题 I'm getting a weird error while trying to create a geo_shape on ES 6.6.1. Say my index has the following mapping: PUT index { "mappings" : { "doc" : { "properties" : { "parcel" : { "type" : "geo_shape" } } } } } Then I try to index the following shape: PUT index/doc/1 { "parcel": { "type": "Polygon", "coordinates": [ [ [ -116.96938484446626, 32.657287303780286 ], [ -116.96965590466098, 32.65769347876227 ], [ -116.96968135808686, 32.6576270315712 ], [ -116.9696296695897, 32.65755262998358 ], [

Convert shp file or geojson to isobus iso-xml ISO 11783-10

末鹿安然 提交于 2020-06-18 19:07:53
问题 has anyone had any experience with ISOBUS Iso-XML (ISO 11783-10)? I would like to convert some geojson and/or shapefiles (.shp) to this format but am having trouble finding any information. 回答1: The specification of ISO 11783-10 is not free. You can buy the specification (google for "ISO 11783-10" ), the documentation is high quality and affordable (I'm not affiliated in any way). The bought documents are distributed with some "license" and will be marked with your name, so buyers will be

Convert shp file or geojson to isobus iso-xml ISO 11783-10

那年仲夏 提交于 2020-06-18 18:57:51
问题 has anyone had any experience with ISOBUS Iso-XML (ISO 11783-10)? I would like to convert some geojson and/or shapefiles (.shp) to this format but am having trouble finding any information. 回答1: The specification of ISO 11783-10 is not free. You can buy the specification (google for "ISO 11783-10" ), the documentation is high quality and affordable (I'm not affiliated in any way). The bought documents are distributed with some "license" and will be marked with your name, so buyers will be

Leaflet.js: Only show specific countries, dim or hide the rest

偶尔善良 提交于 2020-06-17 15:46:13
问题 Based on: Dim/Hide rest of map around country with leaflet.js While the accepted answer was almost spot on, its JSFiddle demo only works for old single polygon GeoJSON. Modern multipolygon GeoJSON allows for additional shapes to make up for overseas territories etc., and thus also introduces extra arrays which the JSFiddle demo doesn't know how to handle: // transform geojson coordinates into an array of L.LatLng var coordinates = france.features[0].geometry.coordinates[0]; var latLngs = [];

MongoDB / Geojson $geointersects problems

[亡魂溺海] 提交于 2020-06-17 13:21:27
问题 It's been now 8 hours I'm trying to deal with a MongoDB Geojson $geoIntersects issue : It's working very well when my polygon is a square, or a rectangle, but I'm unable to get some results from a $geoIntersects request when my Polygon has crossing vertices, like this example : (Image from (https://geoman.io/geojson-editor)) The polygon data looks like this : { "type": "Feature", "properties": { "shape": "Polygon" }, "geometry": { "type": "Polygon", "coordinates": [ [ [-1.565584, 47.226352],

Manipulate GeoJSON Data - reload vector Layer in OpenLayers

こ雲淡風輕ζ 提交于 2020-06-17 08:09:19
问题 I’m stuck on creating a function that manipulates loaded GeoJSON data and updates the OpenLayers Map. What I have so far is a map that works with data filtered from a loaded GeoJSON file. How do I change the vector layer to use updated data? That’s my code so far: load GeoJSON fullGeoJSON : var fullGeoJSON = require("./data/data.json"); create var filteredGeoJSON var filteredGeoJSON = { "type": "FeatureCollection", "features": [] }; fill empty features by filtering the fullGeoJSON function

Update in real time tooltip with react-leaflet when changing language with i18n

假如想象 提交于 2020-06-01 05:43:06
问题 I am currently displaying a Map, thanks to react-leaflet, with a GeoJSON Component. I'm also displaying some tooltips on hover over some countries and cities(for example, when I hover France, a tooltip display "France"). I'm also using i18n for internationalization. The internationalization works fine for the country tooltips, they are updated in real time. I have a function updateDisplay , that switch between a GeoJson component for the countries, or a list of Marker for the cities, on zoom

Convert geopandas shapely polygon to geojson

这一生的挚爱 提交于 2020-05-26 10:34:24
问题 I created a circle using geopandas and it returned a shapely polygon: POLYGON: ((...)) I want this same polygon as a geojson object. I ran across this: shapely.geometry.mapping(shapelyObject) which returns this: {'type': 'Polygon', 'coordinates': (((570909.9247264927, 125477.71811034005)...} But when I try to map this in mapbox it does not show anything. I think maybe it is not fully a geojson object. 回答1: If you don't want to create this dict manually, you can also rely on geopandas creating

Can't extract geo keys, unknown GeoJSON type: { coordinates: [ 13.42493130000003, 52.50074619999999 ]

老子叫甜甜 提交于 2020-05-16 05:19:41
问题 I have this form where I get the info of a user, the user has been saved with a location correctly. But when i try to update it, it gives me this error back: > Can't extract geo keys: { _id: ObjectId('5c4eb6c94f59c09ee7490ee0'), > salt: > "d0ca72b02426c59da828fd65fff93e94ed7c4529f46db883c1f1cfa406be92ce", > hash: > "442a59e8ef32f4d309a1d2a71575c11a6d382e514d75f010e1228e8156ffa8ce71b7451c34b09319780744cc3e50e74e2e25d9ff75e8c7519087bddfa32b906801ed287ded16897c90ac15...", > email: