[postgis-users] newbie postgis and google maps question

Sam Boggess sboggess at gmail.com
Sun Jan 20 19:39:34 PST 2008


The original shape file, that I got from the Oregon Forestry Department, had
this projection:

Data Type: Shapefile Feature Class 
Shapefile: Z:\FSN\seedzone_pre1996\sz_orwa_pre1996.shp
Geometry Type: Polygon

Projected Coordinate System: NAD_1983_Oregon_Statewide_Lambert_Feet_Intl
Projection: Lambert_Conformal_Conic
False_Easting: 1312335.95800525
False_Northing: 0.00000000
Central_Meridian: -120.50000000
Standard_Parallel_1: 43.00000000
Standard_Parallel_2: 45.50000000
Latitude_Of_Origin: 41.75000000
Linear Unit: Foot

Geographic Coordinate System: GCS_North_American_1983
Datum: D_North_American_1983
Prime Meridian: 0
Angular Unit: Degree


So I projected that into mercator in ArcMap:

Data Type: Shapefile Feature Class 
Shapefile: Z:\FSN\seedzone_pre1996\sz_orwa_pre1996_Project.shp
Geometry Type: Polygon

Projected Coordinate System: World_Mercator
Projection: Mercator
False_Easting: 0.00000000
False_Northing: 0.00000000
Central_Meridian: 0.00000000
Standard_Parallel_1: 0.00000000
Linear Unit: Meter

Geographic Coordinate System: GCS_WGS_1984
Datum: D_WGS_1984
Prime Meridian: 0
Angular Unit: Degree


I then used shp2pgsql to add this to my database:

SELECT AddGeometryColumn('members_oldzone', 'poly', 4326, 'MULTIPOLYGON',
2);
ALTER TABLE "members_oldzone" ALTER "poly" SET NOT NULL;
CREATE INDEX "members_oldzone_poly_id" ON "members_oldzone" USING GIST (
"poly" GIST_GEOMETRY_OPS );



Paul Ramsey wrote:
> 
> Your original data is probably not 4326. Do you have any clue what  
> projection it is in? Where did you get it from?
> 
> P
> 
> On Jan 20, 2008, at 7:02 PM, Sam Boggess wrote:
> 
>>
>> Hello,
>>
>> I'm new to PostGIS and this has to be a cakewalk for
>> you experienced users, but your help would be greatly appreciated.  I
>> have a PostGIS enabled database that contains polygon data from a
>> shapefile using SRID 4326.  All I want to do at this point is mark the
>> centers of all of my polygons in Google Maps.  I've written my
>> query, and it works great:
>>
>> select astext(centroid(poly))
>> from zones
>>
>> returns (a bunch of):
>> POINT(-13057223.7425678 6208110.75868711)
>>
>> However, I have no idea what to do with this point data.  Google maps
>> expects lat and long; how can i convert this?  In another forum a user
>> suggested dividing by 10, but that's a point in Northern Canada,  
>> this point
>> should be in NE Washington State.
>>
>> Any Help would be greatly appreciated
>> -- 
>> View this message in context:
>> http://www.nabble.com/newbie-postgis-and-google-maps-question-tp14989995p14989995.html
>> Sent from the PostGIS - User mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 

-- 
View this message in context: http://www.nabble.com/newbie-postgis-and-google-maps-question-tp14989995p14990735.html
Sent from the PostGIS - User mailing list archive at Nabble.com.




More information about the postgis-users mailing list