<div>Hi Greg</div> <div> </div> <div>Thanks for your answer, Let me clarify a bit what I am doing, I got from geocode.com the latitude and longitude from my address and neighbors address. All that I am trying to do is to get a query to retrieve the properties 5 miles around me and another to retrieve the 100 properties closest to me.</div> <div> </div> <div>I am using a geometric column called "geom" which is a point and</div> <div>I generate using </div> <div> </div> <div>update smarter.vow_properties set geom = GeometryFromText('POINT(' || latitude || ' ' ||longitude || ')', 32011);</div> <div> </div> <div>I tried to use make point but it does give me the error below and I am wondering if the reason is that I am using the wrong SRID.</div> <div> </div> <div>update smarter.vow_properties set geom = makePoint (longitude, latitude);</div> <div>"ERROR: new row for relation "vow_properties" violates check constraint
"enforce_srid_geom"</div> <div> </div> <div>When I run this query</div> <div> </div> <div>select srid, srtext, proj4text from spatial_ref_sys where srtext LIKE '%WGS84%'<BR>it returns 574 rows and by the text most of then refer to other places in the world other that the US. The closes I get is 3920 (Puerto Rico / UTM Zone 20N), would this be a good choice? I found out that they are using in fact WGS-84, but I still need to pick 1 out of 574 :-)</div> <div> </div> <div>Thanks in advance again</div> <div> </div> <div>Rafael Orta<BR><BR><B><I>Greg Troxel <gdt@ir.bbn.com></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>I'm new too, but I think you should omit the latitude/longitude<BR>columns and instead simply have a geometry column (which will have<BR>lat/lon in it); the examples in the manual are all like that and the<BR>point of postgis is to make lat/lon be
something that's understood by<BR>the db so the spatial operators can work. Having redundant values<BR>means it's more work and (less certainty) to have them consistent, or<BR>it gets you into adding contraints and update triggers when it isn't<BR>necessary or useful to do so.<BR><BR>For reference system, the real question is what datum the data you<BR>have is in. For country-wide use the choice of a datum tagged as NJ<BR>specific is almost certainly inappropriate.<BR><BR>For the US, and given data in lat/lon, the three likely choices are<BR>NAD27 CONUS<BR>NAD83<BR>WGS84<BR><BR>For mapping, NAD83 and WGS84 are essentially the same (meaning<BR>differences are below the accuracy of your data). NAD27 and NAD83<BR>differ significantly. Odds are good that you should just use WGS84,<BR>but ask your data provider which datum. If they don't know, you have<BR>a problem, but in that case picking WGS84 is probably 80% likely to be<BR>correct.<BR><BR>-- <BR><BR>Greg Troxel
<GDT@IR.BBN.COM><BR></BLOCKQUOTE><BR><BR><BR>***************************************************** <br>Rafael Orta Phone: (609)-330-3193 <br>Sr. Oracle DBA Fax: (856)-642-7679 <br>Technical Manager <br>Oraprofessionals Email: rorta_us@yahoo.com <br>******************************************************<p>
<hr size=1><a href="http://us.rd.yahoo.com/evt=43256/*http://advision.webevents.yahoo.com/mailbeta"> All-new Yahoo! Mail </a>- Fire up a more powerful email and get things done faster.