geojson

Spark: 'Requested array size exceeds VM limit' when writing dataframe

半世苍凉 提交于 2019-12-13 03:16:51
问题 I am running into a "OutOfMemoryError: Requested array size exceeds VM limit" error when running my Scala Spark job. I'm running this job on an AWS EMR cluster with the following makeup: Master: 1 m4.4xlarge 32 vCore, 64 GiB memory Core: 1 r3.4xlarge 32 vCore, 122 GiB memory The version of Spark I'm using is 2.2.1 on EMR release label 5.11.0. I'm running my job in a spark shell with the following configurations: spark-shell --conf spark.driver.memory=40G --conf spark.driver.maxResultSize=25G

Geojson to shapefile convertion using shapefile library

▼魔方 西西 提交于 2019-12-13 03:02:27
问题 I know I can create a shapefile from a geojson if the shapefile only contains Polygons, but in case there is a MultiPolygon I get the following error: return [min(x), min(y), max(x), max(y)] TypeError: '<' not supported between instances of 'list' and 'float'** In return self.__bbox(self._shapes) method under shapefile.py** Any ideas of how I can overcome this problem would be appreciated. Thanks in advance. import shapefile shape_file_writer = shapefile.Writer(SHAPE_FILE_TYPE) #example of

Leaflet checking and disabling GeoJSON sublayers troubleshoots

僤鯓⒐⒋嵵緔 提交于 2019-12-13 02:48:03
问题 I have been fighting with the GeoJSON sublayers in leaflet map. The problem is, that when I switch them off, they still appear, when change the zoom level In this event I cannot even switch them off as per in the image below: Once I only click on the job thick, then console says: Uncaught TypeError: Cannot read property '_targets' of null at NewClass.removeInteractiveTarget (Layer.js:83) at NewClass._removePath (SVG.js:132) at NewClass.onRemove (Path.js:90) at NewClass.removeLayer (Layer.js

How put numered marker with geojson on leaflet

我只是一个虾纸丫 提交于 2019-12-13 00:15:15
问题 Forget everything until here, I spent the dawn trying, to see if I could move forward, I'll explain. I have a map and I need to enumerate the 1 to 15 markings. The markings are correct, the problem that marks only 1, 15 times. This is my json: https://github.com/eltonsantos/analise_integrada/blob/master/path.js simple json, nothing much My code is: var rotas = L.geoJSON(paradas, { onEachFeature: onEachFeature, pointToLayer: function(feature, latlng){ console.log("Qtd: " + paradas.features

Zoom after search using autocomplete

旧时模样 提交于 2019-12-12 19:35:31
问题 How to do after a search, zoom in on the value found on the map? My code is: $("#txtSearch").autocomplete({ source: setoresComerciais.features.map(function(d){ return d.properties.sco_num_sc + " - " + d.properties.sco_dsc_loc }), select: function(event, ui){ map.fitBounds(stComerciaisLayer.getBounds(ui.item.value)); } }); First, I get return d.properties.sco_num_sc + " - " + d.properties.sco_dsc_loc , this return, for example: "1 - FORTALEZA" After, I use select, where have the param ui, when

GeoDjango serialize GeoJSON skipping 'id' field

和自甴很熟 提交于 2019-12-12 19:05:55
问题 I've been using the Geo-Django GeoJSON serializer so that I can retrieve some objects from a PostGIS database and display them on an OpenLayers map. I'm obtaining the objects for display in the following way: gqs = self.model.objects.filter(point__distance_lte=(pnt, long(dist))) type(gqs) <class 'django.contrib.gis.db.models.query.GeoQuerySet'> and the Geo-Objects include all the model fields as expected: self.model._meta.get_fields() (<django.db.models.fields.AutoField: id>, <django.db

downloading geojson file into folium in jupyter

浪子不回头ぞ 提交于 2019-12-12 18:02:27
问题 I want a map of Europe (as json file, so i can work with geojson) to place it on Folium map as layers so I am able to embed my data set onto it to show which country in Europe has the highest alcohol serving. I am having problems with getting the json file from GitHub to open in jyputer This is what I have so far and i have the file of europe country in geojson from github https://github.com/Leaflet/Leaflet.VectorGrid/blob/master/docs/eu-countries.geo.json 回答1: You will have to download that

How to load *part* of a multifeature geojson file in R?

青春壹個敷衍的年華 提交于 2019-12-12 16:18:57
问题 I have a geojson that is a FeatureCollection containing 2 geographic data types: a LineString and a waypoint - see the raw file here - this is how it looks on GitHub: I want to load only only the LineString , so this is what I do: library(RCurl) obj <- getURL("https://raw.githubusercontent.com/Robinlovelace/stplanr/master/inst/extdata/route_data.geojson") writeLines(obj, "/tmp/obj.geojson") obj <- readLines("/tmp/obj.geojson") just_lines <- obj[14:(length(obj) - 28)] just_lines[1] <- paste0("

Which regular expression to use to convert this string to an array?

£可爱£侵袭症+ 提交于 2019-12-12 16:17:06
问题 From a geospatial column in mysql I'm getting the following string-value which I want to convert into an array. Ultimate goal is to convert it to geoJSON. POLYGON((4.885838 52.388063,4.891061 52.388381,4.890973 52.382909)) This string has 3 coordinate pairs with the x and y coordinate separated by a space and the pairs separated with a comma. The exact number is not known and variable. Also the POLYGON can differ to three different settings. With my little knowledge of reg. expressions I came

How to convert from D3 svg to topojson/geojson?

故事扮演 提交于 2019-12-12 14:53:29
问题 D3 allows to convert geojson/topojson arrays of points' coordinates [ [x,y],[x,y],[x,y],...] // aka, a geojson arc. And, via a projection, into svg paths <path d="M x,y x,y x,y ..."></path> // aka, an svg-xml path Note: the values actually change. Points [x,y] in topojson, get new valued via projection([x,y]) for svg's path. So, if we store in the svg: the projection name the points absolute coordonates relative to the svg origine 0,0 (already stored in the path). Use projection.invert() We