shapefile

Matching / Joining SpatialPoints with SpatialLines using R

心不动则不痛 提交于 2020-02-01 08:26:28
问题 Question I have a set of shapefiles for different Bus Routes (Each route has 2 Trips) for Cairo. I wanted to check if they pass by certain stations using R: Stops_Data <- readOGR("Stackoverflow Data/","Stops_Data") Trips_Data <- readOGR("Stackoverflow Data/","Trips_Data") plot(Trips_Data) points(Stops_Data, col = "red") I try to match them using over(). First, I make sure the Projections are identical. proj4string(Trips_Data) <- proj4string(Stops_Data) over(Stops_Data, Trips_Data) This only

GeoJson features coordinates are in meters not in [lng, lat]. How to display in google map?

冷暖自知 提交于 2020-01-29 05:23:27
问题 Eg: [360590, 555610] - [lng, lat] in meters from google map api - GeoJson data { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 360590, 555610 ], [ 360590, 555555.0128 ], [ 360590, 555540 ], [ 360592.4439, 555540 ], [ 360600, 555540 ], [ 360600, 555518.8277 ] ] ] ] } } ] } here, [360590, 555610] - [X, Y] coordinates is in meters, Now we need to display this coordinates on google map, Is there any solution for this?

NetTopologySuite ShapeDataReader Error: Unsupported DBF reader Type 13

萝らか妹 提交于 2020-01-25 06:50:08
问题 I'm trying to read an .shp that I created from geojson.io to do some tests, it gave me an .zip which contains the files below. When I try to read the .shp alone I'm having the error: "System.IO.FileNotFoundException: '.../POLYGON.dbf'". When I try to read the .shp with the .dbf in the same folder I'm having the error: "System.NotSupportedException: 'Unsupported DBF reader Type 13'". I tried to open this .shp in QGIS and it worked. I tried to read other .shp files from other sources with my

Easiest way to plot data on country map with python

匆匆过客 提交于 2020-01-22 10:08:52
问题 Could not delete question. Please refer to question: Shade states of a country according to dictionary values with Basemap I want to plot data (number of sick people for a certain year) on each state of Mexico. I am using jupyter notebook. So far I have seen several options and tutorials, but none seem to seem to explicitly explain how to plot the map of a country. Below I explain some options/tutorial I have seen and why they have not worked (this I do just to argue that tutorials are not

Easiest way to plot data on country map with python

て烟熏妆下的殇ゞ 提交于 2020-01-22 10:08:29
问题 Could not delete question. Please refer to question: Shade states of a country according to dictionary values with Basemap I want to plot data (number of sick people for a certain year) on each state of Mexico. I am using jupyter notebook. So far I have seen several options and tutorials, but none seem to seem to explicitly explain how to plot the map of a country. Below I explain some options/tutorial I have seen and why they have not worked (this I do just to argue that tutorials are not

Identifying grids into a map/shapefile

放肆的年华 提交于 2020-01-16 18:50:14
问题 I have some questions about maps/shapefiles. I'm not a expert in R, so, to make it easier do understand what I'm going for, I'll enumerate: 1- Identify each grid on the map, and maybe omit some of these grids. 2- Color each grid by values from a data frame I just made what i'm trying to make using Photoshop to help to illustrate my goal here I made this map using the 'intersect' function with a shapefile I got from internet and a grid i made using 'rastertoPolygons' function, but I'm not sure

How can I add shape file (.shp) in php and use that shape file data in php file?

自古美人都是妖i 提交于 2020-01-14 02:11:04
问题 I have to develop one project in php and in that I have to include shape file and that shape file needs to be converted in to kml file. I know how to convert shape file into kml file but I don't know how to take/import shape file into php project. and I also have the supporting files with the shape file which contain more information.some of them are .dbf, .shx etc. And this all file's information should also be stored with the shape file information. Is there any tool to import shape file or

Restricting plot to shapefile boundaries in r

给你一囗甜甜゛ 提交于 2020-01-11 09:55:18
问题 I have analysed a dataset of GPS points using density.ppp to generate a sort of heatmap of intensity of the points, as shown below: However, I would like the image to be limited to the borders of the shapefile, similar to below: The first image is called as x <- readShapePoly("dk.shp") xlim<-c(min(912),max(920)) ylim<-c(min(8023),max(8030)) a<-ppp(cases@coords[,1], cases@coords[,2], xlim, ylim, unitname=c("km")) plot(density.ppp(a, 0.1), col=COLORS) plot(x, add=T, border="white") where cases

Issues loading different shapefiles in given sharpmap tutorial code

≯℡__Kan透↙ 提交于 2020-01-07 09:34:28
问题 I am currently working on sharpmap project with the need to work on offline maps. As i am fresher in this field,I am following the sharpmap tutorial and facing a problem with loading new shape files in the given tutorial code. For Example :\ SharpMap.Layers.VectorLayer("States"); vlay.DataSource = new SharpMap.Data.Providers.ShapeFile("path_to_data\\states_ugl.shp", true); At this line of code, if i pass a different shapefile, code builds with a blank background or no display. I have tried

viewing a polygon read from shapefile with matplotlib

99封情书 提交于 2020-01-06 19:46:10
问题 I am trying to view a basic polygon read from a Shapefile using matplotlib and pyshp But all my efforts yield just an empty axes with no polygon. Here are few of my tries, using the dataset showing the borders of Belgium: import shapefile as sf r = sf.Reader("BEL_adm/BEL_adm0") p=r.shapes() b=p[0] points = b.points import matplotlib.pyplot as plt from matplotlib.path import Path imporst matplotlib.patches as patches verts = points verts = [] for x,y in points: verts.append(tuple([x,y])) codes