查询Mysql中两个几何列的交集

时间:2015-10-10 15:35:55

标签: mysql geometry gis shapefile

我在Mysql中有几何表(Multipolygon Shape字段)。我能够成功运行Area和Centroid。有没有办法在MySql中查询两个形状之间的交集,表示为另一个形状的百分比?

根据评论/请求我粘贴在两个mutlipoint几何字段中,因为我无法弄清楚如何在sqlfiddle中创建基于形状的表格以使其更容易,我很抱歉。

邮政编码07024:

POLYGON((-73.982967 40.85601, -73.982439 40.856535, -73.982753 40.856696, -73.981338 40.858725, -73.98116 40.858553, -73.98071 40.858127, -73.979611 40.860178, -73.979382 40.860799, -73.978783 40.860699, -73.977687 40.8605, -73.977625 40.861338, -73.976375 40.863927, -73.975979 40.866037, -73.97581 40.86715, -73.97595 40.867368, -73.976498 40.868123, -73.975997 40.868331, -73.975852 40.868393, -73.975695 40.868462, -73.975424 40.868732, -73.975409 40.868767, -73.973501 40.867578, -73.972993 40.867361, -73.969825 40.865568, -73.969308 40.866081, -73.96889 40.866665, -73.967939 40.86767, -73.967224 40.868426, -73.966833 40.868573, -73.966599 40.868801, -73.965903 40.868417, -73.966106 40.868212, -73.965416 40.867819, -73.964641 40.867337, -73.963922 40.866921, -73.963033 40.866334, -73.961553 40.865627, -73.961057 40.865172, -73.959983 40.864747, -73.959338 40.864314, -73.958603 40.864012, -73.957929 40.863618, -73.95707 40.863094, -73.956499 40.862808, -73.955373 40.862408, -73.954582 40.861799, -73.953682 40.861199, -73.948385 40.858471, -73.951755 40.852121, -73.952044 40.851599, -73.952172 40.851368, -73.953482 40.849, -73.953982 40.848, -73.961982 40.8481, -73.96428 40.845936, -73.964416 40.846578, -73.965254 40.846613, -73.965508 40.846873, -73.965588 40.847314, -73.965493 40.847721, -73.965655 40.847583, -73.966297 40.847017, -73.967897 40.847412, -73.968466 40.84673, -73.968146 40.845991, -73.968481 40.845201, -73.969975 40.843707, -73.970303 40.843316, -73.971301 40.84213, -73.971575 40.841806, -73.972478 40.839104, -73.973107 40.835428, -73.973165 40.834416, -73.972952 40.834229, -73.972949 40.834164, -73.972968 40.834096, -73.973174 40.833617, -73.973334 40.832466, -73.973306 40.831923, -73.973267 40.831735, -73.973956 40.831892, -73.974176 40.831515, -73.974314 40.831326, -73.975646 40.828897, -73.976382 40.8276, -73.977731 40.82829, -73.978276 40.828543, -73.979977 40.829541, -73.98278 40.83107, -73.983573 40.831429, -73.983872 40.831592, -73.984742 40.832144, -73.985562 40.832688, -73.986268 40.833146, -73.986988 40.833553, -73.987719 40.83392, -73.988414 40.834306, -73.988761 40.83452, -73.989092 40.834704, -73.989874 40.835095, -73.990621 40.835377, -73.991325 40.835884, -73.991221 40.836037, -73.991102 40.836253, -73.990782 40.836634, -73.990063 40.83715, -73.988368 40.838989, -73.98773 40.839638, -73.987034 40.840345, -73.985915 40.841463, -73.984496 40.84288, -73.982203 40.84517, -73.982909 40.845573, -73.981298 40.847192, -73.981261 40.847214, -73.981144 40.847338, -73.981849 40.847781, -73.982608 40.848169, -73.98345 40.848469, -73.983527 40.848719, -73.984391 40.849063, -73.984835 40.849151, -73.984801 40.849419, -73.984896 40.850679, -73.985459 40.851398, -73.986166 40.850754, -73.98666 40.850301, -73.986718 40.850249, -73.987145 40.850414, -73.987891 40.850822, -73.987985 40.850884, -73.985961 40.853208, -73.984196 40.854911, -73.984091 40.854855, -73.98367 40.85531, -73.98354 40.85544, -73.982967 40.85601))

李堡,新泽西州:

POLYGON((-73.985961 40.853208, -73.985344 40.853804, -73.984777 40.854344, -73.984228 40.854929, -73.983651 40.85551, -73.983092 40.856083, -73.982599 40.856605, -73.982753 40.856696, -73.981338 40.858725, -73.98116 40.858553, -73.980744 40.858154, -73.98071 40.858127, -73.980363 40.858773, -73.979611 40.860178, -73.979382 40.860799, -73.978783 40.860699, -73.977687 40.8605, -73.977625 40.861338, -73.976375 40.863927, -73.975979 40.866037, -73.97581 40.86715, -73.975695 40.868462, -73.97569 40.868903, -73.975409 40.868767, -73.973501 40.867578, -73.972993 40.867361, -73.970023 40.865686, -73.969825 40.865568, -73.969308 40.866081, -73.96889 40.866665, -73.967939 40.86767, -73.967224 40.868426, -73.966833 40.868573, -73.966106 40.868212, -73.965416 40.867819, -73.964641 40.867337, -73.963922 40.866921, -73.963033 40.866334, -73.962108 40.865929, -73.961553 40.865627, -73.961057 40.865172, -73.959983 40.864747, -73.959338 40.864314, -73.958603 40.864012, -73.957929 40.863618, -73.95707 40.863094, -73.956499 40.862808, -73.955373 40.862408, -73.954582 40.861799, -73.953682 40.861199, -73.948385 40.858471, -73.951755 40.852121, -73.952044 40.851599, -73.952172 40.851368, -73.953482 40.849, -73.953982 40.848, -73.961982 40.8481, -73.96428 40.845936, -73.964416 40.846578, -73.965212 40.846846, -73.96479 40.84776, -73.965493 40.847721, -73.965655 40.847583, -73.96588 40.847401, -73.965979 40.847321, -73.966155 40.847204, -73.966226 40.847134, -73.966286 40.847041, -73.966297 40.847017, -73.966418 40.847051, -73.966735 40.847137, -73.967225 40.847271, -73.967897 40.847412, -73.968193 40.847056, -73.968203 40.847044, -73.968466 40.84673, -73.968146 40.845991, -73.968303 40.845524, -73.968481 40.845201, -73.969975 40.843707, -73.970303 40.843316, -73.971301 40.84213, -73.971575 40.841806, -73.972478 40.839104, -73.973107 40.835428, -73.973165 40.834416, -73.973225 40.834413, -73.973289 40.834392, -73.973332 40.834364, -73.973379 40.834284, -73.973394 40.834221, -73.973391 40.834167, -73.973355 40.833909, -73.973351 40.833778, -73.973398 40.833352, -73.973433 40.833179, -73.973485 40.833009, -73.973814 40.832198, -73.973956 40.831892, -73.97406 40.831701, -73.974176 40.831515, -73.974314 40.831326, -73.975646 40.828897, -73.976382 40.8276, -73.977731 40.82829, -73.978276 40.828543, -73.979977 40.829541, -73.98278 40.83107, -73.983573 40.831429, -73.983872 40.831592, -73.984742 40.832144, -73.985562 40.832688, -73.986268 40.833146, -73.986988 40.833553, -73.987719 40.83392, -73.988414 40.834306, -73.988761 40.83452, -73.989092 40.834704, -73.989874 40.835095, -73.990621 40.835377, -73.991325 40.835884, -73.991221 40.836037, -73.991102 40.836253, -73.990782 40.836634, -73.990707 40.836688, -73.990063 40.83715, -73.988368 40.838989, -73.98773 40.839638, -73.987034 40.840345, -73.985915 40.841463, -73.984496 40.84288, -73.982203 40.84517, -73.981262 40.84611, -73.980579 40.846792, -73.980459 40.846915, -73.981144 40.847338, -73.981849 40.847781, -73.982608 40.848169, -73.98345 40.848469, -73.983527 40.848719, -73.984391 40.849063, -73.984835 40.849151, -73.985717 40.849611, -73.98625 40.850043, -73.986394 40.850027, -73.986431 40.850024, -73.986718 40.850249, -73.987145 40.850414, -73.987891 40.850822, -73.987985 40.850884, -73.985961 40.853208))

0 个答案:

没有答案