<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>

<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Re: [postgis-users] PostGIS and ADO.NET</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText35042 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Jeff,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Just wanted to add to what Abe was 
saying.  Its not entirely true that you have to convert to byte array to 
use except for updating data.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>SharpMap and ZigGIS do that already for you 
I think so you can just focus on writing the SQL statements.  Not sure 
about NetTopologySuite.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>It depends on what you are trying to do I 
guess.  I've used PostGIS in .NET 2.0 and .NET 1.1. in a number of 
ways.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>1) With SharpMap - you may want to look at 
the PostGIS driver they have developed to see how the byte array type thing that 
Abe mentioned is done.  There's is a native driver so only piggy backs on 
the Npgsql PostgreSQL .NET driver.  I have a quick example on my site on 
how to use it.  Although it might have changed since I wrote 
it</FONT></DIV>
<DIV dir=ltr><A 
href="http://www.bostongis.com/?content_name=postgis_sharpmap_tut01">http://www.bostongis.com/?content_name=postgis_sharpmap_tut01</A></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>2) Using Mapserver Mapscript - you can 
play with layers directly from Vb.NET or C#.  Paolo has a nice tutorial on 
how this is done.    </FONT></DIV>
<DIV dir=ltr><A 
href="http://www.paolocorti.net/public/wordpress/index.php/2006/09/20/mapserver-tutorial-for-c-mapscript-asp-net/">http://www.paolocorti.net/public/wordpress/index.php/2006/09/20/mapserver-tutorial-for-c-mapscript-asp-net/</A></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>3)</DIV>
<DIV dir=ltr>Note Paolo also has some nice tutorials on using ZigGIS.  
ZigGIS is strictly an ArcGIS driver so you can only use it in conjunction with 
ArcGIS.</DIV>
<DIV dir=ltr><A 
href="http://www.paolocorti.net/public/wordpress/index.php/2007/02/14/installing-ziggis-11-for-connecting-arcmap-to-postgis-layers/">http://www.paolocorti.net/public/wordpress/index.php/2007/02/14/installing-ziggis-11-for-connecting-arcmap-to-postgis-layers/</A></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>4)  Mapserver CGI where I have 
Mapserver query PostGIS and provide a WMS, WFS interface and then query the WMS, 
WFS interface using  OpenLayers which I then overlay with data from Google 
Maps, Virtual Earth etc.  OpenLayers is a javascript api but has a number 
of interfaces for various Map services.  I personally think its pretty 
neat.  Unfortunately I don't have any really good tutorials on this - I was 
going to write some up on the new Openlayers 2.4 tutorial (which I think 
supports updating data via WFS-T interfaces, a KML driver, a GML driver)  
and setting up Mapserver as a WFS, WMS service.  But sadly I've been 
swamped so haven't had a chance to write these down.  Long on ideas - short 
on time.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Here is just a general OpenLayers 
tutorial</FONT></DIV>
<DIV dir=ltr><A 
href="http://www.bostongis.com/?content_name=openlayers_tut_01">http://www.bostongis.com/?content_name=openlayers_tut_01</A></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><A 
href="http://www.openlayers.org">http://www.openlayers.org</A>  the 
download file has some handy examples as well.</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>5) You can publish PostGIS data with Geoserver (along with other 
datasources by the way) as well to provide a WMS, WFS, WFS-T interface 
and then query or update data with that with anything that supports those 
interfaces.  I haven't done that, but I know MassGIS publishes their ArcSDE 
data using Geoserver and if you want to update data via WFS-T may be something 
to take a look at. GeoServer I think uses java servlets so may not be an option 
for you if you are a strictly .NET/Windows shop.</DIV>
<DIV dir=ltr><A 
href="http://www.geoserver.org">http://www.geoserver.org</A></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>6) Then PostGIS has functions such as 
AsGML, AsKML, AsSVG which you can use to render these kind of formats that can 
then be used in such things as GoogleEarth or other interfaces that support 
these.  I was going to write up some examples on this too in how to use 
this in .NET and PHP but - yah time is non-existent at the 
moment.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Hope that helps,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Regina</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
postgis-users-bounces@postgis.refractions.net on behalf of Abe 
Gillespie<BR><B>Sent:</B> Wed 4/25/2007 6:52 PM<BR><B>To:</B> PostGIS Users 
Discussion<BR><B>Subject:</B> Re: [postgis-users] PostGIS and 
ADO.NET<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Hello Jeff,<BR><BR>There is no *direct* support per se (at least 
none that I know of).<BR>But you can use Npgsql as the ADO.NET data access 
driver and retrieve<BR>the shape data as byte arrays.  To get instantiated 
shape objects<BR>you'll then have to feed the byte array into libraries such 
as<BR>NetTopolgySuite (<A 
href="http://nts.sourceforge.net/">http://nts.sourceforge.net/</A>), 
SharpMap<BR>(<A 
href="http://www.codeplex.com/SharpMap/">http://www.codeplex.com/SharpMap/</A>), 
or consume the byte arrays<BR>directly in your code as is done in zigGIS<BR>(<A 
href="http://code.google.com/p/ziggis/">http://code.google.com/p/ziggis/</A>).<BR><BR>You'll 
have to write your SQL spatial queries by hand.  But I suspect<BR>you'll 
want to do this anyway.<BR><BR>Good luck!<BR><BR>--<BR>Abe Gillespie, 
abe@digital-pulp.com<BR>Programmer for hire - GIS, Business Apps, Website 
Apps<BR><A 
href="http://code.google.com/p/ziggis/">http://code.google.com/p/ziggis/</A><BR><BR>On 
4/25/07, Jeff Dege <jdege@korterra.com> wrote:<BR>> I've done some web 
browsing, trying to find current information on how<BR>> well PostGIS 
integrates with ADO.NET, and while I've found a number of<BR>> discussions, 
none really seemed to answer.<BR>><BR>> Are there current ADO.NET 2.0 
drivers for PostGIS?  Are there current<BR>> drivers for PostSQL?  
If only the latter exist, how does that limit what<BR>> I can do with 
PostGIS?<BR>><BR>> _______________________________________________<BR>> 
postgis-users mailing list<BR>> postgis-users@postgis.refractions.net<BR>> 
<A 
href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR>><BR>_______________________________________________<BR>postgis-users 
mailing list<BR>postgis-users@postgis.refractions.net<BR><A 
href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR></FONT></P></DIV>

</BODY>
</HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>