Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an old table that contains bounding boxes of lat long coordinates in a "box" type. How do I convert them to PostGIS geometry ?

I tried using ST_Transform(ST_SetSRID(se.bound_box::box2d::geometry, 4326), 4326) but it says I can't cast box to box2d or to geometry.

Any help much appreciated

share|improve this question

If the boxes are already in WGS84 datum, then the following should work

SELECT box2d(se.bound_box)::geometry
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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