<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR>
<STYLE>@font-face {
        font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.emailstyle17 {
        COLOR: navy; FONT-FAMILY: Arial
}
SPAN.EmailStyle18 {
        COLOR: navy; FONT-FAMILY: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=blue link=blue>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>I suspect Vinh's problem is not only with the 
SRID.  PostGIS to my knowledge doesn't do any validation of SRID when 
loading  except to check its -1 or the SRID is in the spatial_ref_sys (I 
don't think it even does that much where SRID is concerned).   Given 
that, there should never be a problem with loading the data </SPAN></FONT><FONT 
face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>unless</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008> the data has grossly invalid geometries (e.g. 
weird dimensions, not enough points for a line, invalid geometry type, nonsense 
numbers like INFINITY) </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008> or the shp2pgsql is not being used 
right</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008> I have had cases like that where I have had to go 
in the .sql generated file and remove clearly invalid geometries that were 
causing a transaction abort.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008></SPAN></FONT><FONT face=Arial color=#0000ff 
size=2><SPAN class=883435014-14112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>Vinh,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>What errors are you getting exactly?  
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>Does the .sql file get generated or does it not get 
that far? </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008> if you can't even generate the .sql file, then 
you are using shp2pgsql incorrectly or the executable can't be found.  
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>If it generates the .sql file, but you get a 
transaction abort, then something is wrong with some of the geometries in the 
file </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>or your database is not spatially 
enabled.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>Make sure you can do</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>SELECT postgis_full_version() </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>on your database</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>Hope that helps,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=883435014-14112008>Regina</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of 
</B>Burgholzer,Robert<BR><B>Sent:</B> Friday, November 14, 2008 9:31 
AM<BR><B>To:</B> PostGIS Users Discussion; 
nguyenquangvinh20052005@yahoo.com<BR><B>Subject:</B> RE: [postgis-users] Problem 
in migrating shapefile to postgis<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">You should still be 
able to load this data into postgis, it will default to SRID -1 if you do not 
include the –s switch.  </SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Once inside postgis, 
you can then gain at least some information about the data by querying the 
extent(the_geom) of the table.  That will tell you if it is in some sort of 
lat/lon projection (coords between -180 and +180), or if it is some sort of 
metric system (very large numbers).</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">If it is in a lat/lon 
system, then you should be able to get it to work approximately, with some 
lat/lon projection that works in your area.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">HTH,</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">r.b.</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Robert W. 
Burgholzer</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Surface Water 
Modeler</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Office of Water Supply 
and Planning</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Virginia Department of 
Environmental Quality</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><A 
href="mailto:rwburgholzer@deq.virginia.gov">rwburgholzer@deq.virginia.gov</A></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">804-698-4405</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Open Source Modeling 
Tools:</SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><A 
href="http://sourceforge.net/projects/npsource/">http://sourceforge.net/projects/npsource/</A></SPAN></FONT></P></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Tahoma size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original 
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> 
postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <B><SPAN 
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Burgholzer,Robert<BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, November 12, 2008 12:53 
PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> 
nguyenquangvinh20052005@yahoo.com; PostGIS Users Discussion<BR><B><SPAN 
style="FONT-WEIGHT: bold">Subject:</SPAN></B> RE: [postgis-users] Problem in 
migrating shapefile to postgis</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">First 
place to start to find the proper SRID is look for a metadata file for your 
shape.  If you have that, you may post on the list, perhaps someone can 
help.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">r.b.</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Robert W. 
Burgholzer</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Surface 
Water Modeler</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Office of 
Water Supply and Planning</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Virginia 
Department of Environmental Quality</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><A 
href="mailto:rwburgholzer@deq.virginia.gov">rwburgholzer@deq.virginia.gov</A></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">804-698-4405</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Open 
Source Modeling Tools:</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=navy 
size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><A 
href="http://sourceforge.net/projects/npsource/">http://sourceforge.net/projects/npsource/</A></SPAN></FONT></P></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Tahoma size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original 
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> 
postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <B><SPAN 
style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>vinh nguyenquang<BR><B><SPAN 
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, November 12, 2008 12:36 
PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> 
postgis-users@postgis.refractions.net<BR><B><SPAN 
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [postgis-users] Problem in 
migrating shapefile to postgis</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<TABLE class=MsoNormalTable style="MARGIN-LEFT: 1in; WIDTH: 6in" cellSpacing=0 
cellPadding=0 width=576 border=0>
  <TBODY>
  <TR>
    <TD 
    style="PADDING-RIGHT: 0in; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; PADDING-TOP: 0in" 
    vAlign=top>
      <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
      style="FONT-SIZE: 12pt">Hi, everyone<BR> Can you help me load 
      LopGiaoThong.shp vao trong postgis? I have problem<BR> with SRID or 
      something else i don't know.<BR> I do it in this way: shp2pgsql -i -D 
      -s LopGiaoThong.shp LopGiaoThong ><BR> LopGiaoThong.sql<BR>  
                          
            psql -d postgis -U postgres -f 
      LopGiaoThong.sql<BR> I do not know the parameter -s: what value it is 
      to load LopGiaoThong.shp<BR> Can you show mw how to find the value of 
      -s parameter (SRID) of my data or<BR> how to load my data to 
      postgis?<BR> Thank you very much!<BR><BR><BR>Re: I still can not load 
      LopGiaoThong.shp to postgis. Even though, I tried with -s parameter: 
      32648, 4326, 3405. I really can not find the correct SRID's value of my 
      data. I really appreciated if anyone can help me do 
      it.<BR>Thanks!</SPAN></FONT></P></TD></TR></TBODY></TABLE>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face="Times New Roman" 
size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
<DIV style="MARGIN-LEFT: 0.5in">
<DIV class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-ALIGN: center" 
align=center><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=1>
</SPAN></FONT></DIV></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 1in"><FONT face=Arial size=2><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Nước nào thường cho nhiều học bổng 
du học? Khám phá tại <A 
href="http://sg.rd.yahoo.com/mail/vn/footer/def/*http:/vn.answers.yahoo.com">Yahoo! 
Hỏi & Đáp</A></SPAN></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>

<P><hr size=1></P>
<P><STRONG><font size="2" color="339900"> Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper. </p> <p> </font></STRONG></P>