D
D
den2346242346422019-08-29 12:06:19
PostgreSQL
den234624234642, 2019-08-29 12:06:19

How to convert GeoJSON geodata to PostGIS?

Can you tell me how to convert GeoJSON coordinates to PostGIS coordinates suitable for a Geometry column?
I have a table with imported from xm; file with data and coordinates in it in GeoJSON.
I read, read - I roughly understand that you need to use
UPDATE
SELECT
ST_GeomFromGeoJSON
ST_SetSRID - 4326
I can get data with such a request

SELECT ST_SetSRID(ST_GeomFromGeoJSON('{"type":"Polygon","coordinates":[]}'),4326);

Answer
0103000020E6100000010000000E000000B2255069691943407D02CD8C23B44B4065355D4F74194340D8E033C813B44B408B3D0F4988194340FBACD799E7B34B400B7A14538E194340F40BC050D1B34B40DF92D2229119434007B13385CEB34B408ECFBFB8AF1943401A64DC1ECEB34B403CD862B7CF1943407B81FEE7D5B34B40A52B7D8DC919434092B5E10BEEB34B40D4A46F2DEE19434093BB197FECB34B409BF6DE292E1A43408159A148F7B34B40ED80EB8A191A4340B47AE29414B44B404ABD5DE5BF1943402855EC7948B44B4014724AE59219434009B7C6B13FB44B40B2255069691943407D02CD8C23B44B40

It seems like this is what I need, but I don’t understand how to change it in the entire table.
Who is not difficult - tell me how to convert geodata.
Geo_coordinates column
Thank you))
And is it possible to change the type of the column in geometry after the conversion, or do I need to create a new table and copy the data?
Thanks
5d67953fcee20610858600.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
den234624234642, 2019-08-29
@den234624234642

They suggested on the stack. The question is closed.
Answer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question