<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Very helpful<br>Thanks<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;">----- Original Message ----<br>From: "Obe, Regina" <robe.dnd@cityofboston.gov><br>To: PostGIS Users Discussion <postgis-users@postgis.refractions.net><br>Sent: Wednesday, July 16, 2008 2:08:46 PM<br>Subject: RE: [postgis-users] newbie question: PostGIS and .NET?<br><br>
Well you could load shape files with SharpMap directly into PostGIS<br>since it supports both types but you would have to roll your own a bit,<br>although you can encode the password info etc which you can't with<br>shp2pgsql. <br><br>SharpMap is more designed for if you already have data in PostGIS and<br>you want to query it from PostGIS and display it without having to dump<br>to shape file format first. <br><br>If you just want a shape file to PostGIS loader  - may be easier to just<br>call shp2pgsql or ogr2ogr using the .NET Process class, which is<br>described here<br><a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx
</a><br>.  <br><br>I haven't had a need to do that for loading shape files, but I use the<br>process class for doing xcopy all the time (from one server to another)<br> <br>.NET Process class  would look something like this I imagine -- you may<br>need to fiddle with security, pemissions etc.  I have never tested this<br>so not sure what issues would arise or if you can even do a | using<br>process.  You may need to dump to sql and then load sql file first.<br> <br>   Process.Start("path/to/shp2pgsql", " -s 4269 -I someshapefile<br>somepgtable | psql -h someserver -d gisdb -U somepguser")<br><br>Hope that helps,<br>Regina<br> <br> <br> <br><br> <br> <br><br>________________________________<br><br>From: <a ymailto="mailto:postgis-users-bounces@postgis.refractions.net" href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a><br>[mailto:<a
 ymailto="mailto:postgis-users-bounces@postgis.refractions.net" href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a>] On Behalf Of Saka<br>Royban<br>Sent: Wednesday, July 16, 2008 6:16 AM<br>To: PostGIS Users Discussion<br>Subject: Re: [postgis-users] newbie question: PostGIS and .NET?<br><br><br>It means using SharpMap i can load shapfiles to PostGIS, perform the<br>query and finally have the result in shapefile format? Am i right?<br>Thanks in advance<br><br><br>----- Original Message ----<br>From: "Obe, Regina" <<a ymailto="mailto:robe.dnd@cityofboston.gov" href="mailto:robe.dnd@cityofboston.gov">robe.dnd@cityofboston.gov</a>><br>To: PostGIS Users Discussion <<a ymailto="mailto:postgis-users@postgis.refractions.net" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>>;<br><a ymailto="mailto:postgis-users@postgis.refractions.net"
 href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>Sent: Tuesday, July 15, 2008 10:10:39 PM<br>Subject: RE: [postgis-users] newbie question: PostGIS and .NET?<br><br><br>David,<br> <br>Have him take a look at SharpMap.  Its got .NET drivers for PostGIS and<br>other layer types.<br> <br><a href="http://www.codeplex.com/SharpMap" target="_blank">http://www.codeplex.com/SharpMap
</a><br> <br>It works for both <a target="_blank" href="http://ASP.NET">ASP.NET</a> and windows .net apps.<br> <br>Hope that helps,<br>Regina<br> <br> <br> <br> <br><br>________________________________<br><br>From: <a ymailto="mailto:postgis-users-bounces@postgis.refractions.net" href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> on behalf of Jean<br>David TECHER<br>Sent: Tue 7/15/2008 2:32 PM<br>To: <a ymailto="mailto:postgis-users@postgis.refractions.net" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>Subject: Re: [postgis-users] newbie question: PostGIS and .NET?<br><br><br><br><br>Quoting Saka Royban <<a ymailto="mailto:srph124@yahoo.com" href="mailto:srph124@yahoo.com">srph124@yahoo.com</a>>:<br><br>> Hi all.<br>> Sorry for elementary question. but i didn't find anything to support <br>>  PostGIS in .NET
 environment.<br>> just some driver for Java.<br>> I mainly wanna make a desktop GIS applications and it sounds PostGIS <br>>  helpful to be used as a back-end to manage large number of  <br>> shapefiles. So, is there a way to use this spatial database in .NET?<br>For PostgreSQL you have Npgsql that support PostgreSQL queries<br><br><br>> Queries support by PostGIS are excellent but i need to have export  <br>> of SQL commands in shapefile.<br><br>You have pgsql2shp that could do it! Perhaps need to use API to .net?<br><br>> Thanks<br>><br>> saka<br>><br>><br>><br>><br><br><br><br>===================<br>Jean David TECHER<br>06 60 46 85 05<br>04 99 77 17 87<br>===================<br><br>_______________________________________________<br>postgis-users mailing list<br><a ymailto="mailto:postgis-users@postgis.refractions.net"
 href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users
</a><br><br><br>________________________________<br><br>The substance of this message, including any attachments, may be<br>confidential, legally privileged and/or exempt from disclosure pursuant<br>to Massachusetts law. It is intended solely for the addressee. If you<br>received this in error, please contact the sender and delete the<br>material from any computer. <br><br>________________________________<br><br>Help make the earth a greener place. If at all possible resist printing<br>this email and join us in saving paper. <br><br><br>-----------------------------------------<br>The substance of this message, including any attachments, may be<br>confidential, legally privileged and/or exempt from disclosure<br>pursuant to Massachusetts law. It is intended<br>solely for the addressee. If you received this in error, please<br>contact the sender and delete the material from any
 computer.<br><br>_______________________________________________<br>postgis-users mailing list<br><a ymailto="mailto:postgis-users@postgis.refractions.net" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></div></div><br>

      </body></html>