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.

Filter by
Sorted by
Tagged with
0
votes
1answer
27 views

Reprojecting CRS from Geocode API fails to match shapefile CRS

I have a shapefile obtained from this link. library(rgdal) library(rgeos) dir <- tempdir() unzip('~/Downloads/4106902.zip', exdir = paste0(dir, '/4106902')) shape <- readOGR(paste0(dir, '/...
3
votes
2answers
60 views

Creating raster where each cell records distance to sea?

I want to create a raster with a 25 metre × 25 metre resolution, where each cell contains the distance to the nearest coastline, as calculated from the center of the cell. To do this, all I have is a ...
3
votes
3answers
3k views

Export shapefiles in QGIS to import to ArcMap

I have one question regarding export shapefiles from QGIS to import after to ArcMap 10.6. I export the shapefiles as Save data/ESRI shapefile. After when I try to upload in ArcMap this shapefile, I ...
-1
votes
0answers
10 views

Features dissapeared from a shapefile, while attributes remain in attribute table [duplicate]

In two of my shapefiles, the polygons dissappeared while leaving their attributes in the attribute tables intact. In one shapefile, all 109 polygons dissapeared, while in the other, about 10 of 70 ...
0
votes
0answers
45 views

Opening shapefile by clicking on another shapefile?

For a project I want to open another shapefile by clicking on a specific part of a shapefile. I am using Esri ArcGIS. As a result I want to click with Hyperlink tool at the blue buffer (that was made ...
2
votes
1answer
1k views

Converting XML to polyline shapefile?

I want to convert this XML file to a polyline shapefile. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <ci nc="BMSKDMA10" nl="BMskDMA10" mt="6" ct="DM" dtt="17342" dtu="15/01/2016 ...
1
vote
0answers
22 views

Create shapefile with images as attributes using JavaScript

I want to make a feature in a react.js web application where I can export/download shapefiles from the dashboard. I have implemented shp-write which takes a GeoJSON input. It is working fine with ...
0
votes
0answers
20 views

Memory usage (or absolute bytesize) of geometry objects(shapely) in a GeoDataFrame in Python?

I am currently working on analyzing data structure and size of a shapefile. To analyze it, I was wondering how much geometry column consumes the size of a shapefile. Unlike other features, geometry(in ...
0
votes
2answers
30 views

Rasterize multipoint geometry in R

I would like to rasterize data on protected areas for certain countries (e.g. https://www.protectedplanet.net/country/TH, download button is at the bottom of the page). The dataset contains two ...
1
vote
0answers
61 views

.shx files disappeared/deleted? [duplicate]

I am quite new with QGIS and I created some maps with different layers these last weeks (seems easy but took me hours to do so). As usual, I saved everything in a folder yesterday, but today, I couldn'...
0
votes
1answer
12 views

OGR Merge split part of basename

ogrmerge.py -single -o merged3.shp *.shp -src_layer_field_content {DS_BASENAME} let's me painless merge several shapefiles into one and adds a new field with the basename of the shapefile. Is it ...
0
votes
1answer
62 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 ...
1
vote
1answer
282 views

Export spatial data from SQL Server to ESRI shapefile using OSGeo

i did a join between 2 tables departements2 which has all department with their id and geometry with BM_REGIONFR with id of department and region ( i have 5 region in each region many departement ) ...
0
votes
1answer
25 views

QGIS - KML File Not Displaying Correctly After Conversion

I have a ESRI shapefile made up of 140 polygons that I want to display on Google My Maps. I have my project and layer CRS set to WGS84 which is standard for displaying spatial data on google. However, ...
0
votes
2answers
39 views

Deleting several features from shapefile using ArcPy? [closed]

I recently started working with ArcMap and Python. I try to delete several objects from my shapefile in ArcMap. I would like to select for example the line which are too close together. I don't want ...
2
votes
2answers
154 views

Polygon geometry suddenly disappeared/deleted from shapefile in QGIS

I was editing a polygon shapefile in QGIS (3.0.1) today when suddenly 966 out of 5382 polygons disappeared from the map. I had been changing attribute information in the table, cutting polygons, etc ...
0
votes
0answers
20 views

combine layers in qgis

I have a Shapefile that includes country divisions (Polygon). I have another Shapfile that relates to the country's roadmap (Path). I also have another Shapfile that relates to the village points (...
2
votes
1answer
97 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 ...
0
votes
1answer
52 views

Rebuilding .shx using python/pyshp?

EDIT: I've tried running the code linked in the duplicate flag, it's posted here for reference, and it doesn't run. I had already referred to that answer in my initial post. My problem Downloaded ...
0
votes
1answer
233 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
1answer
32 views

Remove empty polygons from shapefile in R

I have a shapefile witch contains several empty polygons. I´m extracting values from raster file based in some polygons of this shapefile. But my loop stops at every empty polygon. Simple solution ...
6
votes
2answers
4k views

Converting Shapefiles to Mapbox Vector Tiles

We are currently hosting OSM vector tiles on our mapping server (courtesy osm2vectortiles and tilesever-gl). Now I'm trying to convert our own shapefiles into the same Mapbox Vector Tile format so we ...
0
votes
2answers
146 views

How can I write a zipped shapefile with ogr2ogr and /vsizip/?

After reading a bit of GDAL Virtual File Systems docs, I am trying to write a zipped Shapefile using this gdal command involving the use of /vsizip/: ogr2ogr -f "ESRI Shapefile" /vsizip/test.zip\test....
0
votes
3answers
2k views

gdal_rasterize is giving no data while converting a shapefile to raster

I have used next command: gdal_rasterize -burn 1 -tr 30 30 fire_2010.shp fireRaster2010.tif to convert shapefile to raster. But I am getting no data in the raster. The same command works for another ...
1
vote
1answer
3k views

Visualizing shapefile of polygons in Google Earth Engine Explorer

I've just imported a shapefile of polygons in Google Earth Engine Explorer using the website http://shpescape.com/ The problem is that the polygons do not appear when I want to make them visible in ...
2
votes
1answer
36 views

Polygonizing slope raster when output shapefile is more than 4 Gb?

I am trying to polygonize a slope raster using Grass's r.to.vect command. The command starts but ends up crashing because the output shapefile is more than 4 Gb. How could I get multiple shapefiles ...
0
votes
0answers
6 views

Matlab's geographicToDiscrete function does not return the correct col, row

I have a shapefile with points (in WGS84) that overlap with a raster layer (also in WGS84) and for each point I want to calculate the corresponding col and row raster coordinates. I work on Matlab ...
1
vote
1answer
53 views

Get junctions from pipeline in QGIS

I have pipeline network by shapefile, I want to get junctions and it must have link with pipes to run Epanet (id's junctions must have in node1 and node2 of pipeline). I know that we can extract point ...
0
votes
0answers
35 views

Eliminate difference between the area of polygons?

I am working with the shapefile of ecoregions. Arctic desert ecoregion is lying across two continents (Europe and Asia). According to Field calculator area of this ecoregion is 162787 km2. I have ...
3
votes
1answer
259 views

Keep attribute data while converting XML file to shapefile in QGIS?

I want a map of particular area in shapefile format from Google Earth. I created a map using polygon method and save it as KML file format, but when I convert it from ".xml" to "shapefile" format ...
-1
votes
0answers
19 views

Eliminating difference in area? [duplicate]

I have downloaded shapefile of ecoregions. I selected Arctic desert ecoregion to measure area using fields calculator. Area of this ecoregion is 162787,71 km2. Arctic desert ecoregion is lying over ...
2
votes
1answer
536 views

Searching for UN regions/sub-regions shapefile

for a visualisation project I need the boundaries of the UN regions as defined here : http://unstats.un.org/unsd/methods/m49/m49regin.htm That's 21 polygons for the sub-regions. I have been looking ...
1
vote
2answers
186 views

Correct shapefile for Montenegro municipalities?

I downloaded a shapefile for Montenegro from https://gadm.org/download_country_v3.html and created a table in PostGIS using shp2pgsql. The table has column geom of type geometry which is a ...
0
votes
0answers
11 views

Converting PBF to Shapefile with name:xx tags as a column in the attributes

I have a PBF file containing only rivers information (extracted using osmosis when waterway=river). A conversion of this PBF to SHP works fine with ogr2ogr when I am selecting fields like "osm_id" ...
2
votes
1answer
35 views

Read M value (CoordinateXYZM) from shapefile with geotools

After successfully writing M values into a shapefile (.shp, only points for now), I now also want to read the generated file and print the full coordinate set (x, y, z and m) using geotools (23-...
1
vote
1answer
58 views

Creating raster that contains gradients given contour shapefile using R?

Using R I'd like to create a raster from a set of contour shape files, where each cell in the raster contains a value for the derived gradient. I am using OS Terrain 50 contour lines which is open ...
2
votes
1answer
384 views

Using ogr2ogr w/ -s_srs to combine inconsistent EPSG files into PostGIS?

I'm having trouble combining shapefiles from TIGER and different local governments into a single postgis db to query legislative locations. I've imported all data to multipolygon geom, but found some ...
1
vote
0answers
37 views

How to change the color of an specific area of a shapefile using Python?

I have this map and I need to emphasize with a different color some cities from this map: This is my code: import matplotlib.pyplot as plt import json import time import geopandas as gpd from ...
2
votes
1answer
53 views

Exporting shapefile to KML with labels

In QGIS, When exporting my point shapefile to KML, points label are not visible in Google Earth Pro. I follow these steps: In QGIS, my point shapefile has a name attribute Right click on the shape ...
2
votes
1answer
50 views

How can I plot scatter plots over a shapefile using Python?

This is my code: import matplotlib.pyplot as plt import json import time import geopandas as gpd from descartes import PolygonPatch from shapely.geometry import LineString borough = gpd.read_file('...
0
votes
0answers
19 views

Use user-created GIS layer for online survey

I'd like to achieve the creation of an online survey where, within a particular study area, different social groups can indicate their use (presence/absence). In ArcMap (offline) I have a layer ...
0
votes
0answers
11 views

Max string length is 254 for KML?

I have a network link KML which I'm downloading via Python script and then converting to shapefile in ArcGIS Desktop. The problem I'm having is the max field length of 254. It's truncating the ...
1
vote
1answer
49 views

Using delimited text layer to keep only those polygons and records of a shapefile which match a column in the delimited text layer?

What I want to do is trim the shapefile so that only those records and associated shapes that match the same values in a column in the delimited text layer (which in my case is a CSV) are kept in a ...
1
vote
1answer
37 views

Import Shapefile into PostGIS using DB Manger Plugin

When I try to Import Shapefile into PostGIS using DB Manger Plugin in QGIS the error message show "Error 3 Creation of data source "TEST_EST_MILION" failed: ERROR: function addgeometrycolumn(...
1
vote
1answer
29 views

Write M value into shapefile with geotools

I'm using the Java 1.8 library geotools (version "23-SNAPSHOT") to generate a shapefile. Opening the resulting .shp file with QGIS was successfull and I noticed that the gemeotry was apparently ...
13
votes
10answers
61k views

Where can I find Canadian postal code geometries?

Where can I find the shapefiles for Canadian postal codes?
2
votes
1answer
39 views

QGIS slow on show attribute table of a large shapefile and dies on showing selected

Using 3.8.2 Zanzibar 64 bits I am mystified by being able to load the attributes of an approx 1e6 features shapefile (even if it takes a bit of time), but waiting forever to show the attributes of the ...
1
vote
1answer
45 views

Unable to save shapefile edits in QGIS? [closed]

I'm unable to save any shapefile edits (polygon, point, line) using QGIS. I have tried multiple versions including 3.4 and 3.8. I have tried removing all installed plugins. I have tried new projects, ...
0
votes
1answer
219 views

Spatial overlays : Union between multiline and multipolygon with geopandas

I try to overlays (apply union) my multipolygon on the multiline with GeoPandas, but it seem like the GeoPandas overlay function work only with (Multi)polygon. Is there any way to make that with ...
1
vote
2answers
1k views

Convert KML to shapefile by ArcGIS ModelBuilder?

I am trying my hand at ModelBuilder today. This is a simple task; I wish to accomplish this to: Make this task more autonomous Hone my ModelBuilder Skills. All I'm trying to do is create a simple ...