shapefile

How to plot dotted lines from a shapefile in python?

狂风中的少年 提交于 2019-12-11 00:30:15
问题 I am not sure on how to plot a dotted line from a shapefile in Python. It appears that readshapefile() does not have any linestyle for me to set. Below I have a working code where I take a shapefile and plot it, but it only plots a solid line. Any ideas to set me in the right direction? Thanks! The shapefile can be found here: http://www.natice.noaa.gov/products/daily_products.html, where the Start Date is Feb 15th, end date is Feb 17th, and the Date Types is Ice Edge. It should be the first

Combining bordering shapefiles in R

為{幸葍}努か 提交于 2019-12-10 23:07:39
问题 I have five shapefiles of bordering counties in California that I am trying to combine into one large shapefile and maintain the original borders of the counties. I then want to plot points such as this so the map only needs to be a simple map of county boundaries. Is there a way to do this in R or will I have to use something like ArcGIS? There is extensive documentation about merging within a shapefile such as here where both shapefiles have the same coordinates. But no documentation on

Creating random polygons within a set shapefiles boundary in R

本小妞迷上赌 提交于 2019-12-10 21:36:15
问题 I have a shapefile which is the national boundary line of Chile. If possible, I would like to randomly generate e.g. 1000 polygons within this area. I'm wondering what the best way would be to go about this in R? I thought maybe, loading the shapefile using the 'shapefiles' package, then creating a point dataset using something available in 'spatstat'. Then I could create circular polygons based around these points... This is mostly hypothetical and I don't know if its possible. I have some

shapefile to neural network in R

ぃ、小莉子 提交于 2019-12-10 17:12:40
问题 I need to convert a shapefile (ESRI) of roads type SpatialLinesDataFrame in a neural network in R. I do not know how to remove nodes or vertices of the shape. Determine the length of each edge between nodes. With these parameters I can create the network using the packet (network). Summary: Input shapefile for the igraph network in R. Thank you from the South of Chile. 回答1: Here is a try -- library(rgdal) library(igraph) dsn <- system.file("vectors", package = "rgdal")[1] sl <- readOGR(dsn

Testing point with in/out of a vector shapefile

核能气质少年 提交于 2019-12-10 16:05:16
问题 Here is my question. 1. Intro a shapefile in polygon type represent the study area http://i8.tietuku.com/08fdccbb7e11c0a9.png some point located in the whole rectangle map http://i8.tietuku.com/877f87022bf817b8.png I want to test whether each point was located within/out the polygon and do some further operation(for example, sum the grid point amount within the study area) 2. My idea I have two methods all thanks to the information on stack overflow. 2.1 Idea A Rasterize the shapefile into

Troubleshooting topojson installation

為{幸葍}努か 提交于 2019-12-10 09:46:43
问题 I'm new at this an essentially have very little idea of what I'm doing. (FYI I'm working off of this tutorial: http://bost.ocks.org/mike/map/) I'm trying to get topojson to work. I've successfully installed homebrew and node. I've done the "npm install -g topojson" part as well. And then, after that, when I try to type in the "which ogr2ogr" etc -- just, nothing happens. He says if having trouble to edit path variable environments. I have only a vague idea of what that means, and not sure if

Shapefile with ObjectiveC

牧云@^-^@ 提交于 2019-12-10 04:04:45
问题 I like to know if there is a Class, in objective-C, that manipulates shapefile (read/write/edit)? I have found a bunch of stuff on kml files but nothing about shp files, but definitely want to avoid the need of converting files format (shp->kml). Thanks 回答1: There's one from Pascal Brandt, ... (it's a little simplistic, but it certainly does the trick for me) ... CocoaShapeFile. He's just dressed up the C functions in Objective-C clothes, but it works just fine for reading. If you're shooting

Convert table of coordinate to shape file using R

…衆ロ難τιáo~ 提交于 2019-12-09 17:51:56
问题 I have a dataset of point coordinate in UTM zone 48. x y 615028.3 2261614 615016.3 2261635 614994.4 2261652 The CSV file here. I would like to load the CSV and create shapefile using R. My code is: library(maptools) library(rgdal) library(sp) UTMcoor=read.csv(file="https://dl.dropboxusercontent.com/u/549234/s1.csv") coordinates(UTMcoor)=~X+Y proj4string(UTMcoor)=CRS("++proj=utm +zone=48") # set it to UTM LLcoor<-spTransform(UTMcoor,CRS("+proj=longlat")) #set it to Lat Long plot(LLcoor) points

How to limit the raster processing extent using a spatial mask?

六月ゝ 毕业季﹏ 提交于 2019-12-08 20:36:29
问题 I am trying to limit raster processing in MATLAB to include only areas within a shapefile boundary, similar to how ArcGIS Spatial Analyst functions use a mask. Here is some (reproducible) sample data I am working with: A 4-band NAIP image (WARNING 169MB download) A shapefile of study area boundaries (A zipped shapefile on File Dropper) Here is a MATLAB script I use to calculate NDVI: file = 'C:\path\to\doi1m2011_41111h4nw_usda.tif'; [I R] = geotiffread(file); outputdir = 'C:\output\' %

Problem with a column name contains a colon in PostgreSQL

空扰寡人 提交于 2019-12-08 16:39:07
问题 I downloaded the shape data from OSM. I have imported data from Shapefile into PostgreSQL without any problem but I got an error when I do the select statement. Select addr:city From location; Error: syntax error at or near ":" The problem is because of the column name contains a colon. Could anyone help me with this issue? Should I reject this shapefile in the importing process? Is the shapefile normal? 回答1: If you enclose addr:city with quotes it should work: SELECT "addr:city" FROM