Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. DROP TABLE IF EXISTS `test_table`;
  2. CREATE TABLE `test_table` (`uid` int(11) unsigned NOT NULL AUTO_INCREMENT,`geom` geometry NOT NULL, PRIMARY KEY (`uid`), SPATIAL KEY `i_geomidx` (`geom`) );
  3. INSERT INTO `test_table` (`uid`, `geom`) VALUES ('1',ST_GeomFromGeoJSON('{"type": "FeatureCollection","features": [{"type": "Feature","properties": {},"geometry": {"type": "Polygon","coordinates": [[[-91.2,45.4],[-79.8,49.8],[-69.0,43.4],[-88.2,32.6],[-91.2,45.4]]]}}]}',1,4326));
  4. SELECT uid FROM test_table WHERE ( St_intersects(geom,St_geomfromGeoJSON('{"type": "Point", "coordinates": [-80.8,43.7], "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}',1,4326)));
  5. SELECT St_IsValid(geom) FROM test_table;
  6.  
  7. ERROR 1210 (HY000): Incorrect arguments to st_isvalid
  8.  
  9. SET @ls1 = ST_GeomFromText('LINESTRING(0 0)');
  10. SELECT ST_IsValid(@ls1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement