-1

I've just started using CARTO and wanted to join two files: the shape data and the data from the excel file. They have a common column, so I did the analysis and applied the inner join. Then I exported the data to a .csv file, opened it and wrinkled my nose at the the_geom column.

Geo data has the following form:
0106000020E6100000010000000103000000010000000A000000BBE929E002B4004C0F7...[+100-150 chars of this sequence]...B84A40.

It looks as if there was a pattern there, at least for first 30-40 chars - a lot of 0s, some Es (probably power)...

How can I extract information so that I'll be able to use it later for an analysis, for example: x/ycentroid, x/y max, area etc. (or refine what I've obtained)?

  • Cargo is based on PostgreSQL and PostGIS. Read about those and you will see that you do not really need to care about the binary format of geometries. – user30184 Jan 12 '18 at 21:02
  • For starters, where are you taking this data after it leaves CARTO, and further to that, the centroid / max / area can all be done within CARTO itself using SQL and SQL Spatial functions (ST_Area(), etc.) - but maybe you're going out to QGIS to do some of this work? – DPSSpatial Jan 12 '18 at 21:43
  • Ok, so the first step should be working with data that contains the geometries, i.e applying functions like ST_Area, ST_xMax, ST_yMax etc. and THEN joining on the common attribute (after all refine data operations have been done)? – mångata Jan 12 '18 at 22:56
1

As mentioned in some of the comments, CARTO database is built on top of PostgreSQL and PostGIS. On the one hand, the_geom is CARTO's geometry column and that code is a Well-Known Binary representation. On the other hand, you can extract insights using PostGIS functions such as ST_AsText, ST_Centroid or ST_Area.

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.