RH, I'm not aware of an easy way to tell if its in range (I think you can from the proj4text lon a b blah blah blah args) defined in spatial_ref_sys, but I'm not that technically savvy.
If you get something like all the same long lat when you project back to 4326 (WGS 84), or you get weird numbers like 135, 90 etc. then its probably wrong. Given that all your below seem to project to below - I would say you are wrong POINT(-115.583333333333 90) First of all when I look in spatial ref SELECT srtext from spatial_ref_sys where srid = 32107 I get the below "PROJCS["NAD83 / Nevada East",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG"," 6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0 1745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],PRO JECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PAR AMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0 .9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",8000 000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32107"]] " so if you know your data is not in Nevada - you guessed wrong about the spatial reference system Well even if its in the range doesn't necessarily mean you have the right projection. The trick I normally use when I have no clue what projection a data set is in but I have some guesses e.g. I know its a meter projection or the state etc) and I know say the long lat of a point that should be in that range would be something like below (and that usually 0s down to 1 or 2 likely candidates). If the projection doesn't exist in spatial_ref_sys (or I have the ESRI .prj file) - then I go to http://spatialreference.org and do some searches and load up some likely culprits in my spatial_ref_sys table and retry the below db or upload the prj to spatial ref. SELECT srid, srtext, proj4text FROM spatial_ref_sys WHERE proj4text ILIKE '%units=m%' AND srtext ILIKE '%NAD%' AND ST_Transform(ST_SetSRID(ST_MakePoint(-71.015,42.372), 4326), srid) && ST_Expand(ST_SetSRID(ST_MakePoint(239898, 902552), srid),1000) Hope that helps, Regina ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of R H Sent: Thursday, September 11, 2008 11:42 AM To: PostGIS Users Discussion Subject: RE: [postgis-users] Need Help with Transform Thanks for the Help Regina, below are some of the points I attempted. setsrid(MakePoint(834934.2263,26712690.6089, 32107) setsrid(MakePoint(834533.210694,26712881.1962, 32107) setsrid(MakePoint(834224.086891,26712318.3331, 32107) Is there a way to check if it is in the range of the projection? ________________________________ From: [EMAIL PROTECTED] To: [email protected] Subject: RE: [postgis-users] Need Help with Transform Date: Fri, 5 Sep 2008 18:19:58 -0400 RH, This kind of thing happens if your input points are not actually in the projection you say they are with setsrid. Give us an example 32107 point you are using. I suspect it doesn't fall in the range of a valid 32107 point. Hope that helps, Regina ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of R H Sent: Friday, September 05, 2008 1:13 PM To: [email protected] Subject: [postgis-users] Need Help with Transform ________________________________ Transform is returning to the same value, for different inputs? Below is what I have done... select AddGeometryColumn('data_stage', 'table', 'geo4269', 4269, 'POINT', 2) select AddGeometryColumn('data_stage', 'table', 'geo32107', 32107, 'POINT', 2) update table set geo32107= setsrid(MakePoint(x, y), 32107) where .... update table set geo4269 = transfrom(geo32107, 4269) where .... column geo4269 all have the same vaule. select AsText(geo4269) returns 'POINT(-115.583333333333 90)' for all rows. And select AsText(geo32107) returns the point as input. Am I using transform wrong? Or any other problems? Any help many thanks... ----------------------------------------- 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. _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
