0

Any ideas how to make a map from an excel file that has UTM Zone 17 NAD27 x,y's? This is what I wrote in my SQL:

SELECT * FROM storklocations2
UPDATE storklocations2 SET the_geom = ST_Transform(ST_SetSRID(ST_Point(easting, northing),2031),4326)

It gives me an error.

  • Hi Karen, welcome to GIS Stack :) You'll usually get better answers with more detail, such as the text of the error message, and some sample data so others can (attempt to) reproduce the circumstances. Also for code formatting indent by 4 spaces, or use backtick. – matt wilkie Nov 17 '14 at 19:41
  • Try EPSG:26717 instead? That's NAD27 UTM 17 North. EPSG:2031 is NAD27 (CGQ77)-based (for Quebec). – mkennedy Nov 17 '14 at 20:23
  • also, what's the error? – javisantana Nov 18 '14 at 7:48
1

Your approach seems valid, but perhaps you can be getting an error about the type of the columns. You can also try to use ST_MakePoint instead:

SELECT * FROM storklocations2
UPDATE storklocations2 SET the_geom = ST_Transform(ST_SetSRID(ST_MakePoint(easting, northing),2031),4326)

Or if you are using the Editor, even:

SELECT ST_Transform(ST_SetSRID(ST_MakePoint(easting, northing),2031),4326) as the_geom , other_columns, here FROM storklocations2

And then you can "Create a dataset from query" by using the results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.