3
votes
1answer
155 views

Shapefile to table within python

I was just curious as to whats the best way within a python script to get the output a dbf file/ table while the input is a shapefile. (if possible which i'm assuming it is) Is there a way of ...
2
votes
2answers
49 views

Are Xbase-dbf-files still the common standard for shapefiles?

For a Java application and for my personal understanding, I am exploring how to read and write shapefiles (at least shx, shp, dbf). The main purpose is to keep the resulting Shapefile-class and it's ...
0
votes
0answers
13 views

How to export style in sld-format using attribut fields of a shape? [duplicate]

I have some ESRI-Shapes with a .dbf each. In the dbf-File there are attributes like a string. Now i can use one or more attributes to display for example a text on a point by configuring a style. This ...
0
votes
0answers
121 views

PyQGIS joining a dbf to a shapefile

I am trying to join a shp and dbf file using the PyQGIS API. The code I'll use is below: from PyQt4.QtCore import * vector1 = QgsVectorLayer("path to dbf file", "test1", "ogr") id1 = vector1.id() ...
0
votes
2answers
390 views

How to add a field to a shapefile using R

This question is trying to make sense of a post that already exists that looks good, but is failing in practice. The second ranked answer uses the foreign package to read a shapefile attribute table ...
2
votes
1answer
486 views

How do I map data by zip code?

I have a set of data that corresponds to zip code, and I'd like to turn that into a map. From what I've gathered thus far, zip code shapefiles are difficult to find and work with due to the fact that ...
18
votes
3answers
3k views

How to easily edit attribute data using Regular Expressions?

I am writing a tutorial for MSc students that uses QGIS. One of the tasks requires the attribute data to be modified (see pdf draft of tutorial here if interested ). The question is how to get them ...
1
vote
2answers
541 views

Why does ESRI make me store my DBF doubles as strings?

As far as I can tell I have to store all numeric values in a shapefile's associated DBF file as strings (yes, the N type is essentially a string). Can anyone confirm that ESRI does not support the use ...
2
votes
1answer
371 views

coordinates in dbf file wrong

I am new to ArcGis, so please bare with me :D . I converted a polygon in an mdx file I have to a shape file, then converted its vertices to points, then used "add X Y feature" and choosed coordinates ...
1
vote
2answers
416 views

NA values in dbf when exporting shapefile from R with writeOGR?

I´m writing an esri shapefile from R (2.14.1) on windows, using writeOGR in the rgdal package, in the resulting dbf file, NA values in the spatialpointdataframe (in numeric columns) are not translated ...
3
votes
1answer
2k views

How do you add file name to an attribute field?

Does anybody know how to add the shape file name to a field in the file's attribute table? I've found a description: 'You have to use inline variable in CalculateField like %Name% in expresssion ...
19
votes
4answers
4k views

How to bypass 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 ...
11
votes
3answers
2k views

How do you determine a shapefile's charset?

Is there a way to determine the charset used for a given shapefile?
14
votes
4answers
6k views

How to add an attribute field to an existing Shapefile via Python

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 ...