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.
Printable View
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.
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.
Hi,
Thanks for your reply.
But dont know .shp file format.
Help me.
Bye.
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.
Looks like an awful format.
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.
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