opengis

MySQL Great Circle intersection (do two roads cross?)

不问归期 提交于 2020-01-22 02:55:08
问题 MySQL OpenGIS CROSSES doesn't seem to work for me: SET @ls = 'LineString(1 1, 2 2, 3 3)'; SET @xx = 'LineString(0 2, 10 2)'; # SELECT AsText(EndPoint(GeomFromText(@ls))); select crosses(GeomFromText(@ls), GeomFromText(@xx)) returns 0 - expected 1 How would I rewrite this as a MySQL function? Bonus points for using lat, lon and spherical projection (and maybe the Great Circle.) PS I can't create tags and I have lost my old login: Useful tags would be: MySQL OpenGIS CROSSES greatcircle lat lon

Conflicting KML xmlns attribute from KML to XSLT

蹲街弑〆低调 提交于 2020-01-06 15:18:59
问题 I have an XSLT which has the job of reformatting KML to GML. <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.opengis.net/gml" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" exclude-result-prefixes="kml"> <xsl:output method="xml" indent="yes" encoding="utf-8" omit-xml-declaration="yes" /> <!-- Removes all nodes with any empty text --> <xsl:template match="*[.='']"/>

How to find if a point exists in which polygon

本秂侑毒 提交于 2019-12-06 04:35:57
问题 How to find if a point exists in which given set of polygons ? I have coordinates like polygonA = 1(0,0),2(0,5),3(3,4),4(3,5),5( 2,2) polygonB = 1(10,10),2(10,15),3(13,14),4(13,15),5(12,12) I have a point as (6,4) now want to search if this point is in any of this polygon or in both or nearest to which polygon. How to store such data (polygon) ? is there a system / database / algorithm to do this search ? Update : Thanks all for such fast response...I think i need to be more specific... How

How to find if a point exists in which polygon

半世苍凉 提交于 2019-12-04 08:46:31
How to find if a point exists in which given set of polygons ? I have coordinates like polygonA = 1(0,0),2(0,5),3(3,4),4(3,5),5( 2,2) polygonB = 1(10,10),2(10,15),3(13,14),4(13,15),5(12,12) I have a point as (6,4) now want to search if this point is in any of this polygon or in both or nearest to which polygon. How to store such data (polygon) ? is there a system / database / algorithm to do this search ? Update : Thanks all for such fast response...I think i need to be more specific... How to search = Yes...got list of algorithms and library for the same. How to store = based on my research

MySQL Great Circle intersection (do two roads cross?)

点点圈 提交于 2019-12-02 12:10:48
MySQL OpenGIS CROSSES doesn't seem to work for me: SET @ls = 'LineString(1 1, 2 2, 3 3)'; SET @xx = 'LineString(0 2, 10 2)'; # SELECT AsText(EndPoint(GeomFromText(@ls))); select crosses(GeomFromText(@ls), GeomFromText(@xx)) returns 0 - expected 1 How would I rewrite this as a MySQL function? Bonus points for using lat, lon and spherical projection (and maybe the Great Circle.) PS I can't create tags and I have lost my old login: Useful tags would be: MySQL OpenGIS CROSSES greatcircle lat lon - :) Just use INTERSECTS(line1,line2) SET @ls = 'LineString(1 0,1 2)'; SET @xx = 'LineString(0 1, 2 1)'