<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Palatino Linotype";
        panose-1:2 4 5 2 5 5 5 3 3 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Palatino Linotype";}
h1
        {margin-top:24.0pt;
        margin-right:0in;
        margin-bottom:12.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:Arial;
        text-transform:uppercase;}
h2
        {margin-top:16.0pt;
        margin-right:0in;
        margin-bottom:12.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:Arial;}
h3
        {margin-top:16.0pt;
        margin-right:0in;
        margin-bottom:12.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:Arial;
        color:black;}
h4
        {margin-top:16.0pt;
        margin-right:0in;
        margin-bottom:12.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:Arial;
        color:black;
        font-style:italic;}
h5
        {margin-top:16.0pt;
        margin-right:0in;
        margin-bottom:12.0pt;
        margin-left:.25in;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:Arial;}
h6
        {margin-top:16.0pt;
        margin-right:0in;
        margin-bottom:12.0pt;
        margin-left:.25in;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:Arial;
        font-style:italic;}
p.MsoHeading7, li.MsoHeading7, div.MsoHeading7
        {margin-top:16.0pt;
        margin-right:0in;
        margin-bottom:12.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:"Palatino Linotype";
        font-weight:bold;}
p.MsoHeading8, li.MsoHeading8, div.MsoHeading8
        {margin-top:16.0pt;
        margin-right:0in;
        margin-bottom:12.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:"Palatino Linotype";
        font-weight:bold;
        font-style:italic;}
p.MsoHeading9, li.MsoHeading9, div.MsoHeading9
        {margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:3.0pt;
        margin-left:0in;
        text-indent:0in;
        mso-list:l0 level9 lfo1;
        font-size:11.0pt;
        font-family:Arial;}
p.MsoToc1, li.MsoToc1, div.MsoToc1
        {margin-top:6.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Palatino Linotype";
        text-transform:uppercase;
        font-weight:bold;}
p.MsoToc2, li.MsoToc2, div.MsoToc2
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:22.5pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Palatino Linotype";
        text-transform:uppercase;}
p.MsoToc3, li.MsoToc3, div.MsoToc3
        {margin-top:0in;
        margin-right:-1.8pt;
        margin-bottom:0in;
        margin-left:49.5pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Palatino Linotype";}
p.MsoToc4, li.MsoToc4, div.MsoToc4
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:1.0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Palatino Linotype";}
p.MsoToc5, li.MsoToc5, div.MsoToc5
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:99.0pt;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Palatino Linotype";}
p.MsoToc7, li.MsoToc7, div.MsoToc7
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:66.0pt;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:"Times New Roman";}
p.MsoToc8, li.MsoToc8, div.MsoToc8
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:77.0pt;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:"Times New Roman";}
p.MsoNormalIndent, li.MsoNormalIndent, div.MsoNormalIndent
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.25in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Palatino Linotype";}
p.MsoHeader, li.MsoHeader, div.MsoHeader
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:"Palatino Linotype";
        font-style:italic;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:"Palatino Linotype";
        font-style:italic;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.Dash1, li.Dash1, div.Dash1
        {margin-top:6.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.75in;
        margin-bottom:.0001pt;
        text-indent:0in;
        mso-list:l1 level2 lfo4;
        font-size:11.0pt;
        font-family:"Palatino Linotype";}
p.Bullet1, li.Bullet1, div.Bullet1
        {margin-top:6.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        text-indent:-.25in;
        mso-list:l2 level1 lfo2;
        font-size:11.0pt;
        font-family:"Palatino Linotype";}
p.Bullet2, li.Bullet2, div.Bullet2
        {margin-top:6.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.75in;
        margin-bottom:.0001pt;
        text-indent:-.25in;
        mso-list:l3 level1 lfo3;
        font-size:11.0pt;
        font-family:"Palatino Linotype";}
p.Bullet3, li.Bullet3, div.Bullet3
        {margin-top:6.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:1.0in;
        margin-bottom:.0001pt;
        text-indent:-.25in;
        mso-list:l1 level1 lfo4;
        font-size:11.0pt;
        font-family:"Palatino Linotype";}
span.EmailStyle20
        {mso-style-type:personal-compose;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
p.section1, li.section1, div.section1
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p.Dash2, li.Dash2, div.Dash2
        {margin-top:6.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:1.0in;
        margin-bottom:.0001pt;
        text-indent:0in;
        mso-list:l1 level2 lfo4;
        font-size:11.0pt;
        font-family:"Palatino Linotype";}
p.Dash3, li.Dash3, div.Dash3
        {margin-top:6.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:1.25in;
        margin-bottom:.0001pt;
        text-indent:0in;
        mso-list:l1 level2 lfo4;
        font-size:11.0pt;
        font-family:"Palatino Linotype";}
 /* Page Definitions */
 @page
        {mso-endnote-separator:url("cid:header.htm\@01C8640B.922A6950") es;
        mso-endnote-continuation-separator:url("cid:header.htm\@01C8640B.922A6950") ecs;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.2in 1.0in 1.2in;
        mso-footer:url("cid:header.htm\@01C8640B.922A6950") f1;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:489558612;
        mso-list-template-ids:870351120;}
@list l0:level1
        {mso-level-reset-level:level1;
        mso-level-tab-stop:.3in;
        mso-level-number-position:left;
        margin-left:.3in;
        text-indent:-.3in;}
@list l0:level2
        {mso-level-text:"%1\.%2";
        mso-level-tab-stop:.4in;
        mso-level-number-position:left;
        margin-left:.4in;
        text-indent:-.4in;}
@list l0:level3
        {mso-level-text:"%1\.%2\.%3";
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        margin-left:.5in;
        text-indent:-.5in;}
@list l0:level4
        {mso-level-text:"%1\.%2\.%3\.%4";
        mso-level-tab-stop:.6in;
        mso-level-number-position:left;
        margin-left:.6in;
        text-indent:-.6in;}
@list l0:level5
        {mso-level-text:"%1\.%2\.%3\.%4\.%5";
        mso-level-tab-stop:.7in;
        mso-level-number-position:left;
        margin-left:.7in;
        text-indent:-.7in;}
@list l0:level6
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6";
        mso-level-tab-stop:.8in;
        mso-level-number-position:left;
        margin-left:.8in;
        text-indent:-.8in;}
@list l0:level7
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7";
        mso-level-tab-stop:.9in;
        mso-level-number-position:left;
        margin-left:.9in;
        text-indent:-.9in;}
@list l0:level8
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8";
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        margin-left:1.0in;
        text-indent:-1.0in;}
@list l0:level9
        {mso-level-style-link:"Heading 9";
        mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9";
        mso-level-tab-stop:1.1in;
        mso-level-number-position:left;
        margin-left:1.1in;
        text-indent:-1.1in;}
@list l1
        {mso-list-id:561603655;
        mso-list-type:hybrid;
        mso-list-template-ids:466638720 -1101233956 1540783220 -266447652 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-style-link:"Bullet 3";
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:8.0pt;
        mso-bidi-font-size:8.0pt;
        font-family:Symbol;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-style-link:"Dash 1";
        mso-level-text:\F02D;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:8.0pt;
        mso-bidi-font-size:8.0pt;
        font-family:Symbol;
        mso-hide:none;
        text-transform:none;
        text-effect:none;
        text-shadow:none;
        text-effect:none;
        text-effect:none;
        mso-ansi-font-weight:normal;
        mso-ansi-font-style:normal;
        text-decoration:none;
        text-line-through:none;
        vertical-align:baseline;}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:\2013;
        mso-level-tab-stop:1.45in;
        mso-level-number-position:left;
        margin-left:1.45in;
        text-indent:-.2in;
        mso-ansi-font-size:8.0pt;
        mso-bidi-font-size:8.0pt;
        font-family:Arial;
        mso-bidi-font-family:"Times New Roman";
        mso-hide:none;
        text-transform:none;
        text-effect:none;
        text-shadow:none;
        text-effect:none;
        text-effect:none;
        mso-ansi-font-weight:normal;
        mso-ansi-font-style:normal;
        text-decoration:none;
        text-line-through:none;
        vertical-align:baseline;}
@list l2
        {mso-list-id:1184977693;
        mso-list-type:hybrid;
        mso-list-template-ids:16680572 -1569562056 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l2:level1
        {mso-level-number-format:bullet;
        mso-level-style-link:"Bullet 1";
        mso-level-text:\F0B7;
        mso-level-tab-stop:.55in;
        mso-level-number-position:left;
        margin-left:.55in;
        text-indent:.05in;
        font-family:Symbol;
        mso-hide:none;
        text-transform:none;
        text-effect:none;
        text-shadow:none;
        text-effect:none;
        text-effect:none;
        mso-ansi-font-weight:normal;
        mso-ansi-font-style:normal;
        text-decoration:none;
        text-line-through:none;
        vertical-align:baseline;}
@list l2:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l3
        {mso-list-id:1326857467;
        mso-list-type:hybrid;
        mso-list-template-ids:-983386244 -1571011738 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l3:level1
        {mso-level-number-format:bullet;
        mso-level-style-link:"Bullet 2";
        mso-level-text:\F0B7;
        mso-level-tab-stop:.55in;
        mso-level-number-position:left;
        margin-left:.55in;
        text-indent:.05in;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Symbol;
        mso-hide:none;
        text-transform:none;
        text-effect:none;
        text-shadow:none;
        text-effect:none;
        text-effect:none;
        mso-ansi-font-weight:normal;
        mso-ansi-font-style:normal;
        text-decoration:none;
        text-line-through:none;
        vertical-align:baseline;}
@list l3:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>Thanks to Paul and Stephen, both of your suggestions
worked great.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>I have a follow up question that Paul may be interested
in.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>When working on the below, I loaded three polygon
shapefiles to my DB.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>I used shp2pgsql to load my shapefiles to a sql file and
then loaded and ran the sql through PGAdminIII<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>I also have a raster grid that I need to query at the same
time – but since rasters aren’t supported, I thought that I could
convert the raster grid to a point grid.  This is an elevation grid, so
each point has only an elevation attribute.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>When I run shp2pgsql on the resulting point shapefile, it
creates a sql file with no problems.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>However, when I run the sql file in PGAdminIII, PGAdminIII
terminates without any errors or warnings – just shuts down.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>I’ve tried this several times, trying to make sure
that I wasn’t making a mistake – but can’t find any.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>Is there a file size limit either in PGAdminIII or in
PostGIS/PostgreSQL that might be causing this issue?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>Any ideas of why the sql file would cause PGAdminIII to
terminate and is there an alternate means of loading this data?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'>-Thomas<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:10.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Message: 6<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Date: Fri, 25 Jan 2008
22:06:32 -0800<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>From: Paul Ramsey
<pramsey@refractions.net><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Subject: Re: [postgis-users]
newbie question<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>To: PostGIS Users Discussion
<<st1:PersonName w:st="on">postgis-users@postgis.refractions.net</st1:PersonName>><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Message-ID:
<7C2F8D01-D121-419E-BE95-36BCFFE6569B@refractions.net><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Content-Type: text/plain;
charset=WINDOWS-1252; delsp=yes;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>      format=flowed<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Or the more succinct and
modern<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>SELECT the_geom, zone<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>FROM r_zones<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>WHERE<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>  
ST_Contains(the_geom,GeomFromText('POINT(7644373.465626<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>687692.342075)', 2838));<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>On 25-Jan-08, at 8:14 PM,
Stephen Woodbridge wrote:<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>> Try:<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>> SELECT the_geom, zone<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>   FROM
r_zones<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>  WHERE<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>   
setsrid(makepoint(7644373.465626, 687692.342075), 2838) && the_geom<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>    and
within(setsrid(makepoint(7644373.465626, 687692.342075), 2838), <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>> the_geom);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>> Now this assumes that
the_geom of r_zones is also in srid 2838. If not <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>> you will need to
project the point into whatever srid that r_zones is <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>> in.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>> HTH,<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>  -Stephen
Woodbridge<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>   <a
href="http://imaptools.com/">http://imaptools.com/</a><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>> Thomas Crosslin wrote:<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> I’m a new
PostGIS/PostgreSQL user.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> I’ve
successfully set up my database and uploaded a few shapefiles to <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> play with.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> I want to do some
spatial queries and I’m having some difficulty.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>>  I’d
like to extract the polygon that a point intersects – actually I <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> really want to be
able to intersect several layers at once with a <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> given point and
return the values from a particular field from each <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> layer.  But I
decided to start with one layer.  So the table is <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> called
“r_zones” (it is an imported shapefile) and the field I want <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> information
returned from is called “zone”.  So what I want is to <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> know what
“zone” the point falls within.  I’m using PgAdmin
(v1.6.2) <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> to query my database,
Windows, Postgres8.2, PostGIS 1.3.1.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>>  So I’ve
tried a basic query like this:<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>>  SELECT
the_geom, zone<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> FROM r_zones<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> WHERE
GeomFromText('POINT(7644373.465626 687692.342075)', 2838)  I <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> know the WHERE
statement is incorrect, I’ve tried several variants <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> looking at the docs
(like using a distance based query and others) <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>> but cannot make a
successful query.  Where am I going wrong?<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>>   Any
help appreciated.<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>>>  -Thomas<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Palatino Linotype"><o:p> </o:p></font></p>

</div>

</body>

</html>