I'm trying to plot some weather.gov grids in PGAdmin, but the polygon is way off the map
Doing some searching, I believe ST_GeomFromText('POLYGON((x1 y1, x2 y2....xn, yn, x1, y1))')
is what I'm needing to use, and then to cast that to Geography?
select ST_GeomFromText('POLYGON((-121.2163539 42.233639799999999,-121.21070950000001 42.212291899999997,-121.1818863 42.216468899999995,-121.1875249 42.237817199999995,-121.2163539 42.233639799999999))',4326)::geography;
the original coordinates that should be contained in this polygon are 42.1958,-121.2182
I'm probably missing a core concept, but am not sure which... If I remove the SRID, it appears the longitude is correct, but I end up in the northern territories of Canada...
lon1 lat1, lon2 lat2...
GEOGRAPHY
type - the Polygon in your statement is just East of Goodlow Mountain in Oregon. Start reading the PostGIS topics section on theGEOGRAPHY
type and find answers on GIS.SE for all follow-up questions you may have - bottom line is, you should have a reason to chooseGEOGRAPHY
over the baseGEOMETRY
type, and know a little about the pros and cons of both types.