|
-
Jan 21st, 2003, 01:28 AM
#1
Thread Starter
Member
How to read .shp files
Hi,
I am new to GIS.
I want to read .shp file, but I dont know how to do this.
Please guide me or suggest any resource that can help me.
Any help will be appreciated.
Thanx.
-
Jan 23rd, 2003, 06:20 AM
#2
Fanatic Member
Search for "shp" at http://www.wotsit.org
Reading shape files isn't that hard, once you've defined the right structures. In VB I suggest to use arrays for reading. Before you read data, you should redim the array. The size of the array comes usually before the data in the shape file. Also, you should use the index file for faster file search.
-
Jan 23rd, 2003, 02:00 PM
#3
Thread Starter
Member
Hi,
Thanks for your reply.
But dont know .shp file format.
Help me.
Bye.
-
Jan 24th, 2003, 08:08 AM
#4
Fanatic Member
At wotsit you'll find a link to a PDF document describing the shapefile format. It comes from Esri, which has devised the shapefile format. That's all documentation I know of about the shapefile format, and also all documentation I think is necessary.
-
Jan 25th, 2003, 10:11 AM
#5
Looks like an awful format.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 25th, 2003, 02:08 PM
#6
Fanatic Member
It might be awful, but a lot of GIS formats are that way. I don't think there will be a much easier and more efficient way to store geographical data. GIS datasets can grow very large.
The most common formats aren't capable of storing arcs, ellipses and other types of curves; just linear geometries. There are also GIS formats which use databases. Oracle Spatial is the most well known. Another ones are GeoMedia and ArcInfo 8.
Speaking of awful. Have a look at wotsit.org for DGN/ISFF A guy called Frank Warmerdam has a more readable PDF version available of that document. I don't have an url at hand.
-
Nov 10th, 2009, 11:09 AM
#7
New Member
Re: How to read .shp files
Have a look at http://www.mapwindow.org/
With the ActiveX loaded you can use the following code to read in .shp files into a MapView
Code:
Private Sub cmdOpenSHP_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmdOpenSHP.Click
Dim myShape As New MapWinGIS.Shapefile
OpenFileDialogShp.Filter = "Shapefiles(*.shp) | *.shp"
OpenFileDialogShp.ShowDialog()
If OpenFileDialogShp.FileName = "" Then Exit Sub
myShape.Open(OpenFileDialogShp.FileName)
mapView.AddLayer(myShape, True)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|