Type:
Bug
Priority:
Minor
Resolution:
Won't Fix
Affects Version/s:
N/A
I am not sure what is the correct behavior here. The polygon consists of two separate parts (see the picture).
Here http://support.esri.com/en/knowledgebase/GISDictionary/term/polygon I see two definitions of 'polygon':
[data models] On a map, a closed shape defined by a connected sequence of x,y coordinate pairs, where the first and last coordinate pair are the same and all other pairs are unique.
[ESRI software] In ArcGIS software, a shape defined by one or more rings, where a ring is a path that starts and ends at the same point. If a polygon has more than one ring, the rings may be separate from one another or they may nest inside one another, but they may not overlap.
The polygon in question fits the second definition. Also, PostGIS which is rather strict about misuse of different shapes, agrees to create it as a polygon.
But both PostGIS and MariaDB return ST_NumInteriorRings = 1 for it. I don't know why, obviously there are no interior rings in here. I could not however find a clear definition of how ST_NumInteriorRings should behave in this case.
MariaDB [test]> select ST_NumInteriorRings(ST_PolyFromText( 'POLYGON((0 0,10 0,10 10,0 10,0 0),(-1 -1,-5 -1,-5 -5,-1 -5,-1 -1))' ));
+ ------------------------------------------------------------------------------------------------------------+
| ST_NumInteriorRings(ST_PolyFromText( 'POLYGON((0 0,10 0,10 10,0 10,0 0),(-1 -1,-5 -1,-5 -5,-1 -5,-1 -1))' )) |
+ ------------------------------------------------------------------------------------------------------------+
| 1 |
+ ------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
pgis=# select ST_NumInteriorRings(ST_PolyFromText( 'POLYGON((0 0,10 0,10 10,0 10,0 0),(-1 -1,-5 -1,-5 -5,-1 -5,-1 -1))' ));
st_numinteriorrings
---------------------
1
(1 row)
relates to
MDEV-7509
Testing for GIS extensions
Closed
{"report":{"fcp":941.9000000357628,"ttfb":245.19999998807907,"pageVisibility":"visible","entityId":49755,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"52df404d-8369-4033-a402-af16c436fd27","navigationType":0,"readyForUser":1028.800000011921,"redirectCount":0,"resourceLoadedEnd":651.6000000238419,"resourceLoadedStart":251.5,"resourceTiming":[{"duration":184.19999998807907,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":251.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":251.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":435.69999998807907,"responseStart":0,"secureConnectionStart":0},{"duration":184.19999998807907,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":251.80000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":251.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":436,"responseStart":0,"secureConnectionStart":0},{"duration":193.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":252,"connectEnd":252,"connectStart":252,"domainLookupEnd":252,"domainLookupStart":252,"fetchStart":252,"redirectEnd":0,"redirectStart":0,"requestStart":252,"responseEnd":445.10000002384186,"responseStart":445.10000002384186,"secureConnectionStart":252},{"duration":249.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":252.19999998807907,"connectEnd":252.19999998807907,"connectStart":252.19999998807907,"domainLookupEnd":252.19999998807907,"domainLookupStart":252.19999998807907,"fetchStart":252.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":252.19999998807907,"responseEnd":501.69999998807907,"responseStart":501.69999998807907,"secureConnectionStart":252.19999998807907},{"duration":253,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":252.30000001192093,"connectEnd":252.30000001192093,"connectStart":252.30000001192093,"domainLookupEnd":252.30000001192093,"domainLookupStart":252.30000001192093,"fetchStart":252.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":252.30000001192093,"responseEnd":505.30000001192093,"responseStart":505.30000001192093,"secureConnectionStart":252.30000001192093},{"duration":253.30000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":252.60000002384186,"connectEnd":252.60000002384186,"connectStart":252.60000002384186,"domainLookupEnd":252.60000002384186,"domainLookupStart":252.60000002384186,"fetchStart":252.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":252.60000002384186,"responseEnd":505.9000000357628,"responseStart":505.9000000357628,"secureConnectionStart":252.60000002384186},{"duration":253.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":252.69999998807907,"connectEnd":252.69999998807907,"connectStart":252.69999998807907,"domainLookupEnd":252.69999998807907,"domainLookupStart":252.69999998807907,"fetchStart":252.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":252.69999998807907,"responseEnd":506.19999998807907,"responseStart":506.19999998807907,"secureConnectionStart":252.69999998807907},{"duration":335.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":252.80000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":252.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":588.4000000357628,"responseStart":0,"secureConnectionStart":0},{"duration":253.69999998807907,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":253,"connectEnd":253,"connectStart":253,"domainLookupEnd":253,"domainLookupStart":253,"fetchStart":253,"redirectEnd":0,"redirectStart":0,"requestStart":253,"responseEnd":506.69999998807907,"responseStart":506.69999998807907,"secureConnectionStart":253},{"duration":335.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":253.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":253.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":588.6000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":254,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":253.30000001192093,"connectEnd":253.30000001192093,"connectStart":253.30000001192093,"domainLookupEnd":253.30000001192093,"domainLookupStart":253.30000001192093,"fetchStart":253.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":253.30000001192093,"responseEnd":507.30000001192093,"responseStart":507.30000001192093,"secureConnectionStart":253.30000001192093},{"duration":344.9000000357628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":254.19999998807907,"connectEnd":254.19999998807907,"connectStart":254.19999998807907,"domainLookupEnd":254.19999998807907,"domainLookupStart":254.19999998807907,"fetchStart":254.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":254.19999998807907,"responseEnd":599.1000000238419,"responseStart":599.1000000238419,"secureConnectionStart":254.19999998807907},{"duration":358.9000000357628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":258.19999998807907,"connectEnd":258.19999998807907,"connectStart":258.19999998807907,"domainLookupEnd":258.19999998807907,"domainLookupStart":258.19999998807907,"fetchStart":258.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":258.19999998807907,"responseEnd":617.1000000238419,"responseStart":617.1000000238419,"secureConnectionStart":258.19999998807907},{"duration":16.69999998807907,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":600,"connectEnd":600,"connectStart":600,"domainLookupEnd":600,"domainLookupStart":600,"fetchStart":600,"redirectEnd":0,"redirectStart":0,"requestStart":600,"responseEnd":616.6999999880791,"responseStart":616.6999999880791,"secureConnectionStart":600},{"duration":29.400000035762787,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":622.1999999880791,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":622.1999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":651.6000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":529,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":623.1000000238419,"connectEnd":623.1000000238419,"connectStart":623.1000000238419,"domainLookupEnd":623.1000000238419,"domainLookupStart":623.1000000238419,"fetchStart":623.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":623.1000000238419,"responseEnd":1152.1000000238419,"responseStart":1152.1000000238419,"secureConnectionStart":623.1000000238419},{"duration":396,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":719.3000000119209,"connectEnd":719.3000000119209,"connectStart":719.3000000119209,"domainLookupEnd":719.3000000119209,"domainLookupStart":719.3000000119209,"fetchStart":719.3000000119209,"redirectEnd":0,"redirectStart":0,"requestStart":719.3000000119209,"responseEnd":1115.300000011921,"responseStart":1115.300000011921,"secureConnectionStart":719.3000000119209}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":79,"responseStart":246,"responseEnd":252,"domLoading":250,"domInteractive":1088,"domContentLoadedEventStart":1088,"domContentLoadedEventEnd":1138,"domComplete":1423,"loadEventStart":1423,"loadEventEnd":1424,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1068},{"name":"bigPipe.sidebar-id.end","time":1068.9000000357628},{"name":"bigPipe.activity-panel-pipe-id.start","time":1069},{"name":"bigPipe.activity-panel-pipe-id.end","time":1070},{"name":"activityTabFullyLoaded","time":1159.4000000357628}],"measures":[],"correlationId":"6b460346568bd","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":108,"dbReadsTimeInMs":20,"dbConnsTimeInMs":28,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}