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
9
votes
3answers
19k views

How to get all the lat/long coords that define a shapefile

I have a Shapefile with several shapes inside it. Using MapWindow I have been able to determine that the shape I need is the one with shapeId 19. As you can probably tell I have very little ...
5
votes
1answer
7k views

Converting tax map polygons from Shapefile to table of map number and corner coordinates

Fairfax County, Virginia provides a Shapefile here which shows the boundaries of the tax maps as polygons. Each polygon simply consists of four corners, and what I'd like to do is create a table ...
5
votes
1answer
521 views

Trying to fill polygon fills the entire map

I have been given some shp files to be displayed using Mapserver. Until now I was able to find the correct projections, display the map, and show labels. However, I have problems with polygon colors. ...
5
votes
2answers
1k views

Some objects missing after importing a .shp into PostGIS

I have a .shp file which I am trying to import into a PostGIS database using the "PostGis SHP and DBF Loader". This works smoothly but some (maybe 5%) of the records have an empty geometry field. (I ...
5
votes
1answer
4k views

Converting a CAD/DXF file to a SHP file

I have a dxf file which was converted from a CAD file. I used QGIS to convert it to a shp file... This is when I realized that the text associated with the drawing is actually a separate layer... What ...
11
votes
2answers
6k views

Cutting up a shapefile into smaller parts

I've downloaded the 450MB coastline shapefile from OpenStreetMap, I want to split it up in smaller parts. Is there a way to generate a shapefile with only the polygons contained in a smaller area? ...
18
votes
4answers
70k views

Opening and extracting data from Shapefiles?

We are in need of US highway data. We found it for Florida at the state GIS website. We downloaded the data for Florida highway intersections from here (this is a zip file). How do we use these ...
3
votes
1answer
201 views

Get points in point file to write into new field the census tract each is in (from another shapefile)

I have points that represent day care centers which have address and lat-long. I am using lat-long to display. Now I need to sort, count, etc. these points in conjunction with new census data. To be ...
18
votes
7answers
19k views

How to change the order of features in a shapefile?

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 ...
3
votes
0answers
8k views

Generating shapefile in DotSpatial? [closed]

I have a .csv file of coordinates such as the following: -90.19, 38.62, St Louis -122.42, 37.82, San Francisco -74.04, 40.68, New York I want to create a shapefile using DotSpatial that has these ...
4
votes
2answers
3k views

create temporary point geometry feature from coordinates in OGR with Python

I have two shapefiles containing two types of geometry features: one contains polygons and the other linestrings. Because I'd like to use the Within method to check whether the end(or start) of a ...
4
votes
1answer
2k views

Best way to visualize Google Maps and Mapinfo (or SHP or SQLite) at the same time?

I am having a bunch of Mapinfo data of a large area. This data has multiple layers and is also available as SHP, and of course it could be easily converted to SQLite ("SpatiaLite"). Although probably ...
27
votes
5answers
28k views

How to convert image of map into vector format?

What is the best way of converting a gif of a map into a vector format, such as a shapefile? The only relevant parts that I am interested in are the outline of the island so I realize some manual ...
2
votes
2answers
639 views

How to query data from a vector map (shapefile)?

We want to obtain the specific place of the boundaries of a shapefile. We want to be able to get the points of each polygon corresponding to a specific place in order to use these data in an algorithm....
11
votes
4answers
13k views

using shapely: translating between Polygons and MultiPolygons

[EDIT: the solution to this was simply to use OGR to read shapefiles. See geographika's example.] In an ESRI shapefile, there is no distinction between Polygons and MultiPolygons. Furthermore, there ...
10
votes
2answers
7k views

Point (of a linestring) within Polygon using ogr and Python

I'm currently working on a project in which I need to build a topological network out of the geometry features I find in shapefiles. So far using Ben Reilly's open source project I've managed to ...
10
votes
3answers
3k views

Polygon shapefile with null values?

Does anyone know where I can find a sample shapefile that has null entries in it (preferably a polygon shapefile)? I'm not sure how to create one with null entries.
8
votes
5answers
3k views

Problem loading OS OpenData multipoint shapefile into PostGIS

I am trying to load the OS OpenData Strategi shapefile dataset into a PostGIS database. I have had no problems with the polyline and polygon shapefiles, but I am unable to get the point shapefiles to ...
13
votes
3answers
1k views

Centralizing shapefile data into database

I've got hundreds of shapefiles from various different GIS projects that I want to start consolidating into a single database platform, currently attempting this with Postgres / PostGIS. Hardly any ...
3
votes
2answers
1k views

How to join two shapefiles and create a new shapefile using ArcObjects?

Newbie in ArcObjects programming. Using C#. Developing a desktop application. I have two shapefiles. One is a point shapefile Called Addresses and another Polygon shapefile which is called Area. The ...
2
votes
1answer
2k views

Creating a new layer from query results

Newbie in ArcObjects programming. Using C#. Developing a desktop application. I need to join 2 tables: POI layer which is a Point layer and a parcel layer which is a Polygon Where POI.HouseNo ...
20
votes
2answers
32k views

Adding shapefile or feature class as layer in ArcGIS Desktop using Python/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 ...
7
votes
3answers
4k views

How To Convert A Set of ARC/Info ASCII .e00, .e01, .e02, etc Files Into .shp Files

I have a set files that I downloaded with extensions (.e00, .e01, .e02, etc). I have read that these are files used by ARC Info mainly, but I do not have ARC and nor am I really that interested in ...
3
votes
2answers
591 views

mapserver displays raster image in mirror

I've installed Mapserver and used a map file to set a raster layer and vector(shp) layers on top of it. However, although displayed in the expected order, the png file is displayed in mirror(compared ...
3
votes
2answers
2k views

How to get accurate mile markers from DOT ShapeFile?

I'm having trouble getting accurate mile markers through route traversal using PostGIS. Based on the discussion in Geocode from mile marker/milepost to latitude/longitude?, I downloaded Texas ...
10
votes
5answers
7k views

update one shapefile attribute table with values from another dbf table

I try to explain here what I am trying to do: I have one shapefile and one independent dbf table with the same fields. In the dbf table all the fields are populated but in the shapefile attribute ...
4
votes
5answers
2k views

Simplify shapefile parcel layer

I have a very large shapefile with over a million parcels within it. The problem I am having is that the polygons representing each parcel are very jagged. What I am looking for is a simple and fast ...
7
votes
2answers
2k views

Control the colors of a shapefile

I have a Shapefile with road data. Sometimes the roads are blue, sometimes they are green. I didn't used to mind, but now I'm tiling everything so I need to control the colors. I'm loading it with ...
7
votes
5answers
11k views

I am struggling to convert .dwg to .shp, ideas?

Any ideas as to how can I convert dwg to shp? I tried Kosmo and gvSIG. gvSIG kind of worked but it seems like I lost information.. in addition everything was converted into lines, no polygons. I can ...
37
votes
10answers
30k views

Open Source Tool capable of reading Esri File Geodatabase (.gdb)?

I have an ESRI File Geodatabase (.gdb) file that I would like to convert to shapefile (or any other non-proprietary format). Are there any Open Source tools to do so?
2
votes
4answers
569 views

mapserver not displaying anything

I've been reading through Tyler Mitchel's Web Mapping Illustrated and also downloaded a copy of the itasca sample from maptools.org. Then created some shapefiles in OpenEV and modified the itasca.map ...
11
votes
5answers
4k views

how can i convert a shapefile to lat and lon boundaries?

i have a shapefile of country subdivisions and i would like to extract an array of bounding lat and lon for each division.. is it possible to do?
16
votes
2answers
9k views

How to add custom Feature attributes to Shapefile using Python?

I am seeking a way to take an existing Shapefile that has a Feature set of 200 countries. Each country Feature has an attribute of "NAME." My objective is to create a Python script that adds an ...
5
votes
1answer
213 views

How display outlines in a Map, only from a scale, but the colored polygon in all scales?

I want to display a shape with UMN-Mapserver. It has different coloured polygons and also outlines. But I want to display the outlines only, from a specific scale. I could add MINSCALE 150000, but in ...
51
votes
4answers
52k 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' - ...
14
votes
6answers
2k views

Creating simple image from vector data

Can anyone suggest a quick (and preferably open source) way to create an image from a shapefile. For example, I have a shapefile containing parcel boundaries, I want to create a png file depicting ...
7
votes
1answer
2k views

Updating Lat/Longs and actual position of point shapefile using arcpy.UpdateCursor()?

I have a point shapefile with over 3000 points that are updated frequently, when they are updated they need to have their lat/longs changed which is entered into the attribute table. When the lat/...
1
vote
2answers
414 views

Programmatically modify MapTip Expression

If I load a layer via a shapefile and set ((ILayer)myLayer).ShowTips = true; How can I change the tip content (I want to point it to a different column or have a expression of multiple columns) ...
3
votes
1answer
893 views

Opening a shapefile with roads, how to display the road names?

I am using ((AxMapControl)myMap.AddShapeFile( directory, shapeFileName) To display a shapefile which has road data. Now the roads display properly, but the road names aren't displaying. How can I ...
15
votes
5answers
3k views

Does Re-Projecting ShapeFile only update content of *.prj file?

If I wish to change the projection of some shapefiles from .. let's say NAD83 (4269) to WGS84 (4326) ... and by using some 3rd party app .... does this mean the .prj file is only updated .. and not ...
4
votes
1answer
2k views

Mapnik Style Filter on River/Lakes Shapefile attributes (from Natural Earth Data)

As a followup to this question, I downloaded the vector data here: http://www.naturalearthdata.com/downloads/10m-physical-vectors/ and I successfully created the rasterized water/land mask I wanted: ...
7
votes
2answers
1k views

How does shp2pgsql define schema?

Can anyone explain how it is that the shp2pgsql loader for loading shapefiles into PostGIS goes about defining the schema for a table when importing a shapefile? To further explain, shapefiles are ...
4
votes
2answers
959 views

TIGER/Line processing

Does anyone know of scripts for merging TIGER/Line shp files? It is for extracting the road features only, but for the whole of USA. They are provided as shp files for one county at a time here: http:...
6
votes
1answer
4k views

Using QGIS to fix invalid geometry without saying not allowed?

I have a shapefile, and it's got a self-intersecting geometry in it. I'd like to fix the self-intersection, but it will require a few moves. When I attempt to move a point using the QGIS edit tools, I ...
1
vote
2answers
4k views

“Item not found in this collection” when trying to set the Shape on IFeatureBuffer

I'm working on code to open a 3rd party data file and convert it into a collection of features in a custom layer based on FeatureLayer. I have had no issue importing the data itself (nodal data for ...
4
votes
2answers
9k views

How can I convert Shapefiles (SHP) to KML? [duplicate]

Possible Duplicate: How can I convert KML to ESRI’s shapefile format? I have SHP files, I want KML files, what tools can convert?
3
votes
1answer
1k views

Loading map files using ArcGIS Silverlight API?

Is there a way to use the Silverlight API to load common maps formats (i.e., layers, shapefiles or rasters) off of my local machine?
31
votes
12answers
48k 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?
6
votes
1answer
289 views

What is the best way to store Flickr's Shapefiles Public Dataset in SQL Server 2008?

I'm wanting to import specific locations from the Flickr Shapefile Dataset into SQL Server would like to know what is the best way to store the data in SQL Server 2008? Link the the 1.0 Dataset: http:...
26
votes
9answers
17k 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 ...