In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
How to import spatial data layers in mysql, aiming at this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
After a certain version of mysql, it can support the storage of spatial data. When you create a new table in myql, you can see the three field type settings of point, linestring and polygon, corresponding to the point, line and surface data of the storage space.
Vector layers can be imported into the mysql database using shp2mysql. Here's how to import spatial data into the mysql database by converting spatial data into wkt in other ways. The description of wkt can be found in the first paragraph of the official account TE that converts coordinates according to the coordinate system wkt.
Geojson transform wkt also has an open source nodejs class library, see GIS Development: conversion of GeoJSON coordinates and WKT. First of all, query the spatial data table of mysql and show that the result of spatial data is in wkt format.
The way the data is exported as a sql statement, you can see that the data is imported through mysql's spatial function GeomFromText (wkt string).
Therefore, as long as the coordinate information of spatial layer data is processed into the form of wkt, the data of mysql database can be imported.
Can be developed, you can use the above class library to deal with the spatial layer, spliced into sql statements, directly imported into the mysql database. Or, with the help of postgresql database, after importing the space, use the st_astext () space function to query the data results of wkt, and then export it into the form of sql statement for processing, and import it into the mysql database. For the data stored in this kind of database, as long as the data format is clear, it can be processed accordingly.
This is the answer to the question about how to import spatial data layers in mysql. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.