Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [shapefile]

A vector data storage format for storing the location, shape, and attributes of geographic features. Often referred to as 'an ESRI shapefile', as ESRI developed it.

0
votes
1answer
78 views

batch merge error: Error in match.arg(method) : 'arg' must be of length 1

I am attempting to read in a series of polygon shapefiles from a directory and batch merge them into a single shapefile. They all have the exact same field names. I am using this code: all_data <-...
0
votes
0answers
13 views

Creating shapefile/GeoJSON from CSV with zip codes

I have a CSV file containing zip codes to territory code mapping. I would like to create a map showing the boundaries of the territories as either a shapefile, GeoJSON, or TopoJSON. I was able to ...
0
votes
1answer
30 views

Read shapefile with Fiona - AttributeError: 'NoneType' object has no attribute 'get'

I am trying to read in the following shapefile below with fiona: import fiona from shapely.geometry import shape polygons = [shape(feature['geometry']) for feature in fiona.open("myshapefile.shp")] ...
0
votes
1answer
26 views

Seeking Boston shapefile 1630?

I found this map on Reddit and was curious if anyone knows how it was made. https://www.reddit.com/r/boston/comments/2xu9ix/modern_map_of_boston_compared_to_original_1630/ I think I could make it ...
1
vote
3answers
51 views

Switch coordinates in shapefiles

I got some shapes out of a WFS services and the points and polygons are not where they supposed to be. After taking a closer look in the data i came to the conclusion, that the X an Y coordinates ...
1
vote
1answer
36 views

Opening a shapefile with no extension in QGIS [on hold]

I am trying to open an open license shapefile in QGIS (this is the link: https://pub.uni-bielefeld.de/record/2674065), I am not sure if the information is not there or if the content is not complete; ...
0
votes
1answer
37 views

Input points shapefile in shiny app

The application I created allows me to import a polygon shapefile into my Leaflet map. However, I would like to set up a point shapefile import on the same button. I tried several attempts, especially ...
-1
votes
2answers
56 views

Converted shapefile to KMZ has wrong position in Google Earth [on hold]

I have converted some shapefiles that I have with coordinate System of "ETRS_1989_UTM_Zone_32N" to KMZ in ArcMap 10.5. Out of the results, some of them are placed in a right location and some of have ...
0
votes
1answer
38 views

Drawing a marker on a shapefile with the given latitude and longitude?

I am using shapefiles to draw a custom map. They were created successfully with the help of ArcGIS Desktop. Now I need to draw a marker on shapefile based on an existing tuple of lat, lng. How can I ...
0
votes
2answers
34 views

Reading shapefiles using for loop: Error in readOGR() : length(dsn) == 1L is not TRUE

I'm using a for loop to read in multiple shapefiles within a directory and manipulate them individually. Presently I cannot do this because the for loop results in the error: "Error in readOGR(...
0
votes
0answers
32 views

TIFF somewhat does not match with a shapefile

Two layers, one .shp and a NDVI image (from the MODIS, exported it in TIFF format from envi), have the same geographic coordinate system (GCS_WGS_1984), but they are not overlapping 100% in ArcGIS. ...
1
vote
1answer
33 views

Creating 1 hectare rectangle polygon surrounding points and dividing it into equal sized sub-quadrats in ArcGIS Desktop?

I have a set of points like this: ] I have only these points' information. Now I want to draw a boundary of this points whose size should be 1 hectare (100m x 100m). After that, I want to subdivide ...
1
vote
1answer
63 views

How to convert a jpeg map of borders into a shapefile?

I have a map of French departments from the 19th century (impossible to find in shapefile format) in jpeg format and I would like to convert it into a shapefile in order to regroup raster data and ...
1
vote
1answer
42 views

Splitting an administrative region into given number of parts

I have the following plot. I want to divide the administrative region into given number (say 20) equal parts. library(maps) data(world.cities) Pakistan <- data.frame(map("world", "Pakistan", ...
-2
votes
0answers
21 views

Polygons vector shapefile conversion to xyz format using Python [on hold]

I have to convert a vector multipolygons shapefile to an xyz file where x and y are the lon and lat of points in the vector file extent, and z is equal to 0 for a point outside polygons, and equals 1 ...
2
votes
1answer
124 views

How can we extract values from a raster and put it in a shapefile?

I just started using QGIS for a research project and I am not at all familiar with the software nor the formats used. I have a shapefile representing the different departments of France, delimited by ...
0
votes
0answers
21 views

How to create and modify a multipolygon so that it does not overlap when merging layers in QGIS?

I am new to QGIS. I need to modify a shapefile so I can add a circle in a Canadian province to be used for Tableau afterwards. I tried to use QGIS to modify the shapefile. I have created a new layer ...
0
votes
0answers
14 views

Aligning shapes to terrain in CityEngine?

I have a problem. As soon as I click "Align shapes to Terrain", my shapefile rectifies and falls down the edge. In the first picture(Border_Issue1) you can see that all shapefiles have the right size,...
1
vote
1answer
81 views

Deleting empty Geometry in shapefile using GDAL command-line GDAL utilities?

How empty geometries be deleted from shapefile using the command-line GDAL utilities?
37
votes
4answers
23k views

Simple thematic mapping of shapefile using Python?

I wish to visualize geographical data in Python, without using ArcGIS/ArcPy, and make a map. On the internet I found how to make a thematic map using Python: Here is some code that I tried: ...
8
votes
1answer
1k views

Choosing Python 3 libraries for GIS analysis? [closed]

I am trying to do some spatial data analysis in Python 3 now, and I was wondering what the best libraries are for GIS in Python 3. The Fiona library was developed with Python 3.3 but the Python 3+ ...
0
votes
0answers
33 views

How to export Google Maps zip polygon to shapefile

I have the following URL that is a zip polygon from Google Maps that I want to export to shapefile and open in QGIS. How can I do that?
1
vote
1answer
35 views

PostgreSQL - Creating DB, User privileges [closed]

I created a database named "wchiba" in postgres using : create database wchiba; Then I create a user : create a user saifeddine with password "0000"; Then I grant privileges : grant all on ...
9
votes
3answers
14k views

Converting shapefile to SVG keeping internal data?

I am very new to GIS. I found a tutorial on how to make a choropleth using Python tools. I want to follow it but use my own data and map. However the tutorial uses a US map SVG file and I need to use ...
1
vote
1answer
36 views

Extracting admin boundary data from OpenStreetMap?

I'm really just looking to get borders for cities and regions around the world. Ideally in a shapefile format. Does anyone know how I can do that from OpenStreetMap?
0
votes
1answer
21 views

password authentication failed for user “ASUS”

I'm creating table in PostgreSQL using these commands: shp2pgsql -s 32632 watershed.shp watershed > watershed.sql psql -f watershed.sql cambridge psql -f watershed.sql cambridge But I had ...
0
votes
2answers
763 views

How to add a shapefile in eCognition?

I added the shapefile from thematic layers but I am not able to view the imported shapefile in the project window on the image.
2
votes
3answers
120 views

Assigning each point name of polygon in which it lies using QGIS?

I am completely new to QGIS, and to the world of shapefiles and GIS in general. I have the shapefile of a city, divided into its districts. On top of it I add a layer from a csv, with a certain ...
-1
votes
0answers
20 views

Looking for polygon data for metropolitan areas around the world [duplicate]

So I've been looking for the past 2 days and haven't found any good reliable sources. I've been on OSM a ton and it seems that everything is a different standard. Some cities themselves are as big as ...
16
votes
8answers
38k views

Seeking shapefile of city boundaries in US?

Where can I find a shapefile that contains boundaries for the major cities in the United States? I have tried the census website but could not find anything.
1
vote
2answers
582 views

Seeking data source for worldwide urban/statistical areas as polygons?

I am looking for a shapefile (or any format really) that has worldwide coverage of major urban areas / statistical areas as polygons with names. Similar to what the US census Bureau' Core Based ...
7
votes
3answers
2k views

Seeking urban area shapefiles for France, Germany and Belgium?

I'm trying to make a map like this for the Low Countries/Rhineland, where I basically show how spread out all the urban areas would be there if the urban areas had similar densities to American urban ...
0
votes
0answers
46 views

Convert gdb to shp file? [closed]

I am trying to convert a large gdb file (648 MB) into a shape file. I have searched and tried many different methods but have no luck. This .gdb file is associated to a lyr file. I am running ArcGIS ...
2
votes
0answers
42 views

How to make a polygon on QGIS based on a PDF image? [closed]

I'm trying to take an image out of a PDF and make a shapefile on QGIS. How can I do that?
2
votes
1answer
51 views

Finding highest value within a shapefile or feature class using ArcGIS Desktop?

I want to find the highest value within a specific area of a shapefile feature class but am unsure about how to do this. From the attatched image, I want to find the pixel within the outlined region ...
1
vote
0answers
27 views

Reset / Clear button, upload shapefile on R Shiny

I would like to create a button that would allow me to reset a fileinput, and delete the previously imported shapefile. Here is my code: server.r: library(shiny) library(shinydashboard) library(...
3
votes
1answer
55 views

Overlapping polygons layer order

Is there a way in QGIS to prioritize the layering order overlapping polygons. I have a shapefile with numbers in the attribute table from 1-20. Each number is associated with its own polygon. I want ...
0
votes
1answer
56 views

Add coordinates and id field into point shapefile in R/PyQGIS

I have a points shapefile with almost 1 million features. I would like to add three new attributes: y, x (coordinates) and an ID (integers from 1). How can I perform this task in R or PyQGIS? Using ...
2
votes
1answer
22 views

Using shapefile from MT.gov in Leaflet with R?

I would like to use shape files from http://ftp.geoinfo.msl.mt.gov/Data/Spatial/MSDI/Cadastral/Parcels/Sheridan/ However, the shape files are not showing up. My code is working with files from a ...
1
vote
1answer
141 views

What's the difference in these two shapefiles?

I'm trying to plot points on these maps in R, with points from "Coordinates" in the same folder. The WL.shp plots fine with the data, but the NG.shp (which should only be larger and of the same area +...
3
votes
2answers
56 views

Merge shapefiles with common field

I'm trying to merge several shapefile layers. Each of the layers has three attributes: CGRSName: Name of the grid cell (same for each shapefile) CGRSType: explains the type of grid (not important ...
2
votes
1answer
34 views

Merge only overlapping shapefiles using FME

I am very new to FME. I have 10 shapefiles which overlap but not from beginning to the end! Therefore I want FME to detect "segments" where there is overlapping and splits into such segments the ...
2
votes
1answer
75 views

Extract areas with certain pixel values from raster

I have land cover data from GEE (https://developers.google.com/earth-engine/datasets/catalog/ESA_GLOBCOVER_L4_200901_200912_V2_3) for specific countries. I would like to extract the values from the ...
1
vote
1answer
43 views

Merging road segments into one road line in QGIS

I have a Shapefile with a road network (lines) which includes several road segments (lines). Is there any way to merge all these lines into one line using QGIS?
1
vote
2answers
50 views

Rounding coordinates to 5 decimals in GeoPandas?

I have a shapefile, which I converted into geopandas dataframe. I would like to round the coordinates to 5 decimals. Is there a method/function in geopandas that can do this? My shapefile contains ...
1
vote
0answers
39 views

Changing CRS of geometry in geopandas dataframe efficiently?

I have a shapefile which I am converting into a geopandas dataframe. The CRS of this shapefile is epsg:4326 and I want to convert this to epsg:3857. import geopandas as gp file_path = 'zip_poly.shp' ...
0
votes
1answer
129 views

Identify EPSG in SQL Server

I have been trying to load a shapefile available at https://www.elections.on.ca/en/voting-in-ontario/electoral-district-shapefiles/open-use-data-product-licence-agreement/download-shapefiles.html to ...
1
vote
2answers
34 views

Create a circle in R, and plot it in a shapefile

I want to plot a circle with a radius of 5 miles around a hospital in Massachusetts. I was using some previous answers found here, but it is not working. st_buffer shows an error. library(sp) ...
0
votes
0answers
25 views

Loading shapefile using ArcPy in Pycharm?

I want to use ArcPy and pycharm to do zonal statistics. When I loaded shapefile just as I did in the python console in arcgis, the pycharm identifies the shapefile as string type and I got the ERROR ...
0
votes
2answers
40 views

Fiona and Geopandas not applying CRS to shapefile during creation

I'm trying to create a shapefile of points from a coordinate list. But, when I use fiona to create the shapefile Arc Catalog is showing that there is no CRS. I tried to add the CRS with Geopandas and ...