PostGIS extension function use case and explanation (format conversion) (st_asGeoJSON, st_asText, st_asWKT....)

In this article, we will focus on learning the commonly used functions for spatial data format conversion in postGIS, and postgis for commonly used spatial data formats such as geojson, wkt, kml, gml, etc. We do an explanatory note and use case teaching.

Students who do not know how to download and install postgresql and postgis extension installation can read my two articles:

PostgreSQL+PostGIS download and installation tutorial (macOS/windows)_postgresql+postgis installation_Crazy GISer's Blog-CSDN Blog

Okay, let's get to the point. First of all, we need a database link tool. Of course, you can use navicat, but I still recommend using a very lightweight, open source and gis-friendly tool——DBeaver.

Because this tool embeds leaflet inside, it can have a good display effect on graphics:

 So in this article we use this sql to write something.

We prepare a test data, which is the shape data of Hangzhou City, and import it into the database. Let's use a simple sql to look at the data first:

Supongo que te gusta

Origin blog.csdn.net/lz5211314121/article/details/129486519
Recomendado
Clasificación