Skip to main content

All Questions

Filter by
Sorted by
Tagged with
108 votes
16 answers
76k views

Identifying Coordinate System of Shapefile when Unknown?

I have a Shapefile but its coordinate system is Unknown, and there is no *.prj file. How can I identify it now?
com's user avatar
  • 3,694
124 votes
8 answers
370k views

Calculating polygon areas in shapefile using QGIS

How do I calculate areas of an area shapefile in square meters (m²) or in acres (ha)? I didn't find that functionality in the Vector Tools.
desputin's user avatar
  • 2,331
53 votes
3 answers
76k views

Reprojecting vector layer in QGIS

I have a series of layers of lines (shapefiles) in My Project. The CRS of some are different and to merge them they all must have same CRS. When I use Processing > Toolbox > Qgis_algorithims >...
razi's user avatar
  • 531
9 votes
2 answers
1k views

Computing dominant area in polygon using ArcGIS Desktop?

First, I have a shapefile consisting of square grids and each grid has an ID. Second, I have a shapefile consisting of different zones (with IDs). A grid ID in the first shapefile can contain many ...
GISnew's user avatar
  • 359
116 votes
5 answers
302k views

Merging multiple vector layers to one layer using QGIS

I've imported several shapefiles which where exported from a Mapinfo .tab. Several .tab-files are imported resulting in 20+ layers. Afterwards I want to export it to GeoJSON; but I'm reluctant to ...
stUrb's user avatar
  • 2,329
57 votes
5 answers
75k views

Which character encoding is used by the DBF file in shapefiles?

Which character-encoding is used by the dbf-file in shapefiles? It seems it is handled different, based on the program and the local encoding-settings of the machine. Which encoding is 'right' - ...
Mnementh's user avatar
  • 1,155
25 votes
4 answers
130k views

Changing projection of shapefile in QGIS

How do I change the projection of my shapefile using QGIS? The default projection is set to EPSG:3003, I want to change it to WGS84 EPSG:32632. When I do a reprojection or I change projection in the ...
Filippo's user avatar
  • 513
31 votes
8 answers
24k views

Using ogr2ogr to convert all shapefiles in directory?

I have a directory with several shapefiles. How can convert all these shapefiles to MapInfo with ogr2ogr? I know how I can convert one file. And I can make a batch script writing a line for each ...
Stefan's user avatar
  • 2,152
15 votes
4 answers
10k views

Setting default value for attributes in shapefiles using QGIS

In QGIS 2.14.6 I would like to define a default value for an attribute in a shapefile (or spatialite layer as well) which is applied if the user doesn't explicitly sets the value. Is there a way to ...
Jochen Schwarze's user avatar
22 votes
2 answers
41k views

Adding shapefile or feature class as layer in ArcMap using ArcPy

I am trying to automate various tasks in ArcGIS Desktop (using ArcMap generally) with Python, and I keep needing a way to add a shapefile to the current map. (And then do stuff to it, but that's ...
Tom W's user avatar
  • 429
11 votes
5 answers
21k views

Clipping LAS data using shapefile polygons and open source software?

I am trying to clip or filter lidar files (.las, .xyz) using a shapefile that contains multiple polygons. Is there open source software that can do this spatial operation? My .las files are enormous,...
Allen Bustenai's user avatar
115 votes
23 answers
144k views

Converting between KML and shapefile (SHP) format

My users are sending me point data that were digitized using Google Earth. How can I convert their KML to a shapefile and vice versa?
TroutSlayer's user avatar
  • 1,373
39 votes
5 answers
80k views

Writing Shapely geometries to shapefiles

Can someone demonstrate a simple way to write geometry data-structures from shapely into shapefiles? I am particularly interested in polygons with holes and linestrings. It would also be beneficial to ...
terra_matics's user avatar
34 votes
5 answers
13k views

Bulk load multiple shapefiles into PostGIS

I've got over a hundred data layers in shapefile format that I want to upload into a PostGIS database. They are all in the same projection, but represent different data layers so they do not have the ...
RyanKDalton's user avatar
  • 23.2k
50 votes
4 answers
65k views

Joining non-spatial CSV file to spatial data (shapefile) using QGIS

I have a CSV file which has postcode data in a field, but it is non-spatial e.g. no Easting and Northing. I have a shapefile with postcode in a field and some additional data. I want to join the ...
gisuser's user avatar
  • 545
40 votes
15 answers
121k views

Converting MapInfo TAB and/or MIF to SHP using free tools or ArcGIS for Desktop core product?

How do I convert MapInfo TAB and/or MIF files to SHP using only free tools or ArcGIS itself? I've not had much luck trying to do this in the past and I don't want to have to shell out for the ArcGIS ...
Charles Roper's user avatar
37 votes
6 answers
59k views

Converting .shp into .gpx using QGIS

I would like to convert .shp into .gpx. Using GIS, I open my shapefile and I tried to "save as" gpx but it gives an OGR error: creation of field ObjectId failed (OGR error: Field of name '...
ePascoal's user avatar
  • 951
30 votes
6 answers
35k views

Using ogr2ogr to convert GML to shapefile in Python?

I am trying to convert a GML to an ESRI shapefile using ogr2ogr utility in a python script. I have successfully installed the GDAL/OGR package via osgeo but I am now struggling to find/understand ...
Matt's user avatar
  • 2,706
22 votes
3 answers
92k views

Check if a point falls within a multipolygon with Python

I have tried several examples of code using libraries such as shapefile, fiona, and ogr to attempt to check whether a point (x, y) falls within the boundaries of a multipolygon created with ArcMap (...
spartmar's user avatar
  • 563
18 votes
2 answers
16k views

Computing parameters for QGIS Affine Transformation

I have a vector floorplan (DXF) that I've added to a blank project in QGIS using the Dxf2Shp Plugin. I've been reading tutorials and StackExchange threads, but I can't seem to find out how to "...
flackend's user avatar
  • 283
9 votes
7 answers
25k views

Fixing corrupt shapefile?

I have a shapefile that I was working on in ArcGIS Desktop 9.3 get corrupted somehow and it gives me the error "Number of shapes does not match the number of table records.". What I would want is to ...
Erick's user avatar
  • 871
33 votes
12 answers
63k views

Converting shapefiles to text (ASCII) files? [duplicate]

How can I convert a shapefile (GIS) to text, or, how can I extract the information in a shapefile?
juanpablo's user avatar
  • 431
32 votes
3 answers
43k views

How to encode shapefiles from LATIN1 to UTF-8?

Is there a way to encode shapefiles from LATIN1 to UTF-8?
againstflow's user avatar
  • 5,054
17 votes
2 answers
5k views

Ortho Projection produces artifacts

I`m trying to create a sphere-like view using qgis and the "world from space"-projection http://spatialreference.org/ref/sr-org/6980/ (essentialy an ortho-projection). ArcGIS wraps the shapes ...
user1523709's user avatar
6 votes
3 answers
7k views

Joining table field with shapefile using PyQGIS

The following is currently unsuccessful at fulfilling a table field join to a point shapefile in QGIS. All instances of the join object will print the proper values, and no error is flagged when ...
Katalpa's user avatar
  • 871
17 votes
2 answers
98k views

Changing unit of measure from degrees to meters in QGIS?

I am running QGIS 1.7.0 on windows, and I donwloaded a shapefile of census block group boundaries from TIGER. This file appears to be in the WGS 84 coordinate system, and when I open it in QGIS the ...
Zach's user avatar
  • 843
8 votes
1 answer
636 views

Projection transformation of a shapefile

I am using QGIS 3.18.1. I am working on a map around Alaska. I added a world basemap, then added DEM and finally drew a few polygon shapefiles on top. I then tried to find a projection more ...
Mario Westphal's user avatar
7 votes
1 answer
6k views

Storing datetime values in Shapefiles using QGIS?

I have a shapefile with date in a string field. I create a new field with date type and use the calculator to make the conversion. But the result only provide the date part, the time part is removed. ...
Juan Carlos Oropeza's user avatar
4 votes
2 answers
14k views

Intersect Shapefiles using Shapely

What I'd like to try and do is intersect some point buffers with census tracts, maintain their ID's and the tracts attributes. I found a sample from http://www.macwright.org/2012/10/31/gis-with-...
GIS Danny's user avatar
  • 733
61 votes
5 answers
48k views

Bypassing 10 character limit of field name in shapefiles?

I'm exporting geometry with attached text attributes from oracle database to esri shapefile format (.shp) with Java and Geotools library. Attribute columns in our database have names with more than ...
denu's user avatar
  • 839
58 votes
6 answers
58k views

Is there an automatic function in QGIS to package all files in a project for transferability?

In my project, I use a lot of geodata from different directories. Now I want to give the QGIS project to a colleague (eg on a CD). Is it possible to copy the shapes from different directories ...
Hendrik Pehlke's user avatar
43 votes
7 answers
39k views

Choosing File Geodatabase (*.gdb), Personal Geodatabase (*.mdb) or shapefile format?

Previously, I have used geodatabases as an easy way to keep all files together rather than having dozens of shapefiles all over the place, and it is easier when finally exporting all the relevant data ...
29 votes
3 answers
106k views

Cropping Shapefiles in QGIS?

I need to clip a large and very detailed shapefile in QGIS showing environmental data similar to a temperature map. Is there something like the very simple crop tool like in Adobe Photoshop where ...
birgit's user avatar
  • 525
27 votes
9 answers
20k views

How can I convert an excel file with x, y columns to a shapefile?

How can I convert an excel file with x, y columns to a point shapefile? There are some somewhat optional requirements in addition to the correct creation of a shapefile: Column types (as per Excel's ...
fmark's user avatar
  • 9,411
27 votes
1 answer
20k views

Selecting features by attributes using ogr2ogr?

I am writing a shapefile after some processing; however, in the final step I need to do some selection by attributes from the the shapefile. I am using the command in a shell with the aim of using it ...
user2757128's user avatar
19 votes
7 answers
27k views

Changing order of features in shapefile [closed]

I have a shapefile and I want to change the order of the features. Is that possible? I want to sort the features in the shapefile because I'm embedding this shapefile in a mobile app. The app will ...
tato's user avatar
  • 813
13 votes
2 answers
4k views

Losing polygons after projecting map in QGIS

I'm fairly new at GIS, but I've run into a problem with a projection of a world map. I have a shapefile of all countries I downloaded from Natural Earth. After projecting it into a orthographic as ...
Jessica's user avatar
  • 163
7 votes
1 answer
3k views

Creating parallel line in ArcGIS Pro using ArcPy?

I want to create offset/parallel lines for my centre lines (over 12000 polylines) in different distance for each class number(i have numbers in column) and with the same line direction as centre line. ...
Losbaltica's user avatar
  • 1,479
54 votes
2 answers
96k views

Understanding difference between Polygon and Multipolygon for shapefiles in QGIS?

Creating Scratch layer gives me a choice between Polygon and Multipolygon, so I started wondering how should I make use of them. Reading a new book "Mastering QGIS" (through this answer by Joseph to ...
Kazuhito's user avatar
  • 31.2k
38 votes
10 answers
78k views

Adding Attribute data to shapefile?

I can display a shapefile in openlayers but I need to add some attribute data. I can open the dbf file in excel but there is no save as option in excel to the updated file as a dbf. What is the ...
ChrisJ's user avatar
  • 1,129
38 votes
4 answers
31k 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: ...
NYannickske's user avatar
17 votes
1 answer
51k views

Resizing shapefile features proportionally in QGIS

In QGIS (1.8.0-Lisboa) on Windows (OSGeo4W Install), how would you resize a feature proportionally? The only way I've found to do this is by hand using either the Freehand Editing (0.2.6) plugin or ...
paperclip's user avatar
  • 273
12 votes
5 answers
21k views

Generating start and end points for LineStrings

I want to create start and endpoints in QGIS for a Linestring shapefile. I tried using the "QChainage Plugin" but was not useful. Can someone suggest a tool?
Duffer's user avatar
  • 463
9 votes
3 answers
15k views

How to read Greek fonts (ISO-8859-7) in shapefile attributes within QGIS 1.8.0?

I'd like to ask whether there is a way to read greek fonts in a shapefile's attribute table within QGIS 1.8.0.
ZISIS's user avatar
  • 91
1 vote
1 answer
2k views

Reverse gdal_rasterize (-i option) does not work

When I use: gdal_rasterize -b 1 -b 2 -b 3 -burn 255 -burn 255 -burn 255 polygon.shp tiff.tiff I get a new tiff with a white hole in it with the shape of the polygon shp. However, when I use the ...
Gery's user avatar
  • 2,131
96 votes
5 answers
157k views

Renaming attributes/fields in shapefile attribute table using QGIS

I would like to rename some fields in my attribute table: Like rename "XRF_N3"in something else. It seems quite a easy issue but I don't find any information about how can I do that.
G M's user avatar
  • 2,078
28 votes
5 answers
58k views

Converting shapefiles to GeoJSON

I'm trying to convert shapefiles from the State of Texas Senate Districts website into a GeoJSON file for use with Google Maps API. I'm using QGIS to facilitate but I can't get the projection/...
user28781's user avatar
  • 281
27 votes
2 answers
65k views

Extracting intersection areas in R

I have two polygons. One contains fields(X,Y,Z) and the other contains soil types (A,B,C,D). I want to know what area of every field contains which type of soil. I tried the following: library(rgdal)...
user2386786's user avatar
27 votes
5 answers
33k views

Adding attribute field to existing Shapefile via Python without ArcGIS

I have a Python script that adds an attribute field to a Shapefile if doesn't exist. This is easy to do with ArcGIS (graphically or via Python), but I'm looking for something that doesn't depend on ...
Mike T's user avatar
  • 42.4k
26 votes
3 answers
35k views

Order of polygon vertices in general GIS: clockwise or counterclockwise [closed]

Two days ago I asked a question about the internal storing order for the vertices of a polygon in ESRI shapefiles. That question was answered (Are polygons stored clockwise or counterclockwise in a ...
jgpallero's user avatar
  • 759

1
2 3 4 5
18