srid

How to create a circle in meters in postgis?

假装没事ソ 提交于 2019-12-30 06:37:21
问题 I would like to ask how to create a circle with radius=4km . I have tried the ST_Buffer function but it creates a larger circle. (I see the created circle by inserting its polygon into an new kml file.) This is what i am trying. INSERT INTO camera(geom_circle) VALUES(geometry(ST_Buffer(georgaphy(ST_GeomFromText('POINT(21.304116745663165 38.68607570952619)')), 4000))) The center of the circle is a lon lat point but I don't know its SRID because I have imported it from a kml file. Do I need the

MySQL Spatial - Convert from SRID 31287 to 4326

笑着哭i 提交于 2019-12-10 18:10:28
问题 In MySQL I have a a database with around 100 tables. They all contain a column called ´shape´, this is a polygon type field. It contains information in what I believe (st_srid returns 1, but it's wrong) is SRID 31287. I would like to convert it to SRID 4326, how would I go about to do this? 回答1: You have two problems here. Your internal representation is wrong, it's SRID 1, and it should be SRID 31287. Changing an internal representation is possible in every database: MySQL will get a mutator

How to create a circle in meters in postgis?

£可爱£侵袭症+ 提交于 2019-11-30 20:23:52
I would like to ask how to create a circle with radius=4km . I have tried the ST_Buffer function but it creates a larger circle. (I see the created circle by inserting its polygon into an new kml file.) This is what i am trying. INSERT INTO camera(geom_circle) VALUES(geometry(ST_Buffer(georgaphy(ST_GeomFromText('POINT(21.304116745663165 38.68607570952619)')), 4000))) The center of the circle is a lon lat point but I don't know its SRID because I have imported it from a kml file. Do I need the SRID in order to transform the geometries etc? KML files are always lat/long and use SRID=4326. This

How do you know what SRID to use for a shp file?

蹲街弑〆低调 提交于 2019-11-30 10:20:27
问题 I am trying to put a SHP file into my PostGIS database, the the data is just a little off. I think this is because I am using the wrong SRID. The contents of the PRJ file are as follows: GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]] What SRID does this correlate to? And more generally, how can I look up the SRID based on the information found in the PRJ file? Is there

ST_DWithin takes parameter as degree , not meters , why?

一曲冷凌霜 提交于 2019-11-28 18:53:25
The ST_DWithin document says , the third parameter(distance) is in meters. But when I execute some query , it seems it takes the 3rd parameter as 'degree' ? Here is my simplified table structure : > \d+ theuser; Table "public.theuser" Column | Type | Modifiers | Storage | Description ----------+------------------------+-----------+----------+------------- id | bigint | not null | plain | point | geometry | | main | Indexes: "theuser_pkey" PRIMARY KEY, btree (id) "point_index" gist (point) Referenced by: ... Has OIDs: no All points are stored with SRID=4326. And this is the query : > select *

ST_DWithin takes parameter as degree , not meters , why?

非 Y 不嫁゛ 提交于 2019-11-27 20:24:26
问题 The ST_DWithin document says , the third parameter(distance) is in meters. But when I execute some query , it seems it takes the 3rd parameter as 'degree' ? Here is my simplified table structure : > \d+ theuser; Table "public.theuser" Column | Type | Modifiers | Storage | Description ----------+------------------------+-----------+----------+------------- id | bigint | not null | plain | point | geometry | | main | Indexes: "theuser_pkey" PRIMARY KEY, btree (id) "point_index" gist (point)