Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have stored my data in PostGIS (PostgrSQL). Now I want to read the data in DotNet ArcEngine Application using VB.NET/C#.

Anyone know how to read the data from PostGIS in .Net?

Regards

share|improve this question
    
I want to read a esri shapfile as a layer that is stored in PostGIS so that I can load it into ArcEngine –  miqureshi Aug 1 '11 at 6:43
    
PostGIS doesn't store Esri Shapefiles. It stores geometry/geography data types, and fetches data thorough a database connection—not through file IO, as is the case for Shape files. I'm going to guess your question asks "How to read geometry data from PostGIS in .Net" –  Mike T Aug 1 '11 at 8:04
    
Not really an answer, but take a look at this [old] code for zigGIS –  Mike T Aug 1 '11 at 8:27
    
OK How to read geometry/geography let say Country so that I can load it as layer in ArcEngine. –  miqureshi Aug 1 '11 at 9:25

2 Answers 2

I myself load geometry from an Oracle database into .NET. I use de OGC libraries supplied by GDAL. It is not pleasant to handle the geometry this way. In retrospect I would try and use the libraries from the SharpMap application.

share|improve this answer

Assuming you have ArcGIS 10, the easiest way to view PostGIS Data in an ArcEngine Application, is to create a query layer in ArcMap, and then save it as a .lyr file. You should then be able to view the data in your ArcEngine Application

If you want to Edit data or do complicated queries, you can use the new ISQLWorkspace interface.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.