shapefile

Leaflet JS + Leaflet.Deflate - Changing default marker icon to custom icon

时间秒杀一切 提交于 2019-12-25 08:36:21
问题 In my previous post 'Leaflet JS - changing esri shape into marker on certain zoom level ' I was able to resolve an issue which i had with the leaflet JS library and changing the polygon shapes to markers icons when hitting a certain zoom level. I was advised by 'Ivan Sanchez' to use the 'Leaflet.Deflate' plugin and this works like a charm, so now the various shapes are being transformed into markers after a certain zoomlevel, however now I'm struggling to change the default leaflet marker

Batch convert .csv files to .shp files in R

。_饼干妹妹 提交于 2019-12-25 06:39:23
问题 I am trying to convert a large number (>500) of text files into shapefiles. I can successfully convert a single .csv into a projected shapefile. And I can get lapply and 'for' loops to work when just loading, cleaning up, and exporting the text files. But the code fails when I add in steps to convert to shapefiles within the loops. Below are two ways I've tried tackling the problem and the associated error messages: General processing/definitions- library(rgdal) library(sp) crs.geo<-CRS("

adding land boundary to a filled.contour plot

孤者浪人 提交于 2019-12-24 15:14:16
问题 I'd like to add the boundary lines for Scotland into a filledContour plot I have of a raster file. so my code currently looks like: filledContour(neap_hu3, levels=seq(-1,8,0.25), col=rgb.palette(36), plot.title = title(xlab="Longitude", ylab="Latitude"), plot.axes={ axis(1); axis(2); contour(neap_hu3, add=T )} ) where neap_hu3 is my raster file. I've tried adding map(add=TRUE) but that didn't work. also tried plotting a shapefile of the boundary after the filledContour plot but that didn't

How to calculate geographic distance between two points along a line in R?

女生的网名这么多〃 提交于 2019-12-24 07:26:12
问题 Inputs I have two shapefiles that I Import into R, so that I end up with. A spatiallinesdataframe containing bus routes. A spatialpointsdataframe containing bus stops. Plotting a given route with its stops looks like this. Sample Data This link includes two shapefiles to download as a zip with a sample two routes. Target My aim is to calculate the geographic distance in meters between every pair of stops: Stop 1 to Stop 2, Stop 2 to Stop 3, etc. across the length of the underlying bus route.

Shapefile to TopoJSON conversion problems

拜拜、爱过 提交于 2019-12-24 07:18:38
问题 I'm trying to convert a shapefile to GeoJSON and then to TopoJSON as described in Let's Make a Map. Somewhere along the chain, something gets corrupted and my resulting image looks like below: My workflow is as follows: Download shapefile from: http://vcgi.vermont.gov/warehouse/search_tools - I am working with the Master Town Boundary data, specifically, the "Boundary_BNDHASH_region_towns.shp" file. Convert shapefile to GeoJSON ogr2ogr -f GeoJSON vt_towns.json Boundary_BNDHASH_region_towns

use R to rasterize shapefile with holes?

自闭症网瘾萝莉.ら 提交于 2019-12-24 03:08:37
问题 I am attempting to use R to rasterize some downloaded shapefiles that include polygons with holes in them and R is failing to recognize the holes. The holes seem to be designated as hole=T, so I don't think the issue is the one solved in the question: rasterize ESRI shapefile with holes but FALSE hole slots What else could be going on? How do I troubleshoot this issue? I've been using the rasterize function without any changes to the default settings, and the data I've been working with are

Read & write shapefiles in android or java (.shp)

徘徊边缘 提交于 2019-12-24 01:15:45
问题 Read & Write shapefiles in android or java How can i read and write shapefiles in Android or java? .shp .shx and etc i much searched but nothing I want read file and edit information and write in same file or new file. This is important i can write to file. i can read file but this isn't my problem Thanks 回答1: Take Gdal for android for a try. Gdal A translator library for raster and vector geospatial data formats that is released under an X/MIT style Open Source license by the Open Source

How do I split/divide polyline shapefiles into equally-length-smaller segments?

China☆狼群 提交于 2019-12-24 00:54:16
问题 I have a polyline shapefile, which represents part of an urban road network. My shapefile contains several line/street segments (in my case 58). By using R-cran, I would like to further divide the polyline segments into smaller parts having equal length (e.g. 10 m). To provide an idea: When I import my polyline shapefile into R, and I create a dataframe, it looks like: # Import the polyline shapefile into a SpatialLinesDataFrame object: # library(sp) sp.roads <- readOGR(dsn="/Users/mgv

Bokeh Mapping Counties

我与影子孤独终老i 提交于 2019-12-23 01:35:13
问题 I am attempting to modify this example with county data for Michigan. In short, it's working, but it seems to be adding some extra shapes here and there in the process of drawing the counties. I'm guessing that in some instances (where there are counties with islands), the island part needs to be listed as a separate "county", but I'm not sure about the other case, such as with Wayne county in the lower right part of the state. Here's a picture of what I currently have: Here's what I did so

Add new column attribute to the shapefile and save it to database using Geotools Java

≯℡__Kan透↙ 提交于 2019-12-23 01:29:11
问题 I am transforming a shapefile by adding a new column attributes. Since this task is performed using Java, the only option I know for now is using Geotools. I have 2 main concerns: 1. I am not able to figure out how do I actually add a new column variable. Is the feature.setAttribute("col","value") the answer? I see from this post just the example:https://gis.stackexchange.com/questions/215660/modifying-feature-attributes-of-a-shapefile-in-geotools but I dont get the solution. //Upload the