1

I'm new in Geographic Information Systems and programming.

I have some points referencing Barcelona, Spain. These points are comming from City Hall's opendata site. They say they are in ETRS89 reference system. I don't really know what it means. I need them in Latitude Longitude system so I can pass them to CARTO, OpenStreetMaps, GoogleMaps...

Here some points example:

430344431;4582166733 430344431;4582261851 430344431;4582060238 430344431;4582301912 430344431;4582201841 430344431;4581863161 430344431;4580885282 430344431;4582098182 430344431;4582313751 430344431;4581900735 430344431;4581281417

1

After importing the dataset into CARTO, you have to update your the_geom column using the following SQL query:

UPDATE 
  horts_urbans
SET
  the_geom = ST_Transform(ST_SetSrid(ST_MakePoint(etrs89_coord_x, etrs89_coord_y), 25831), 4326)

I have used the horts_urbans dataset from City of Barcelona open data portal.

  • your solution on the fonts dataset gives this error: 'geometry srid (25831) does not match column (4326) ' – PereCullera Aug 11 '16 at 15:28
  • Are you talking that all x values are the same so that's why dataset is wrong? @ramiroaznar – PereCullera Aug 11 '16 at 15:34
  • Another problem can be that values are in mm not in meters. I'm thinking in preprocess the data with Proj4 or you think i can get this via sql? – PereCullera Aug 11 '16 at 15:37
  • Fixed. It should run OK with horts_urbans dataset. But as I said, I believe fonts x coordinates are wrong. – ramiroaznar Aug 11 '16 at 15:39
  • Effectively the dataset is wrong, i've done a script in Python and here are the results perecullera.carto.com/viz/48d9e518-5fde-11e6-a807-0e3ff518bd15/… – PereCullera Aug 11 '16 at 16:17

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.