Closed usefksa closed 4 years ago
Hi @usefksa, thanks for reporting this. Let me check on it and get back to you later today
Hi @usefksa, can you please validate this one if possible?
insert into `districts` (`boundaries`, `city_id`, `district_id`, `name_ar`, `name_en`, `region_id`)
values
(ST_GEOMFROMTEXT('POLYGON(
(46.7248791 24.64900056,46.7310504 24.64742521,46.73275344 24.64701684,46.73323508 24.64690287,46.73320262 24.64676244,46.73317722 24.6466208,46.73315892 24.64647825,46.73314778 24.64633508,46.73314857 24.64621162,46.73315606 24.64608834,46.73317024 24.64596556,46.73319107 24.64584357,46.7332185 24.64572267,46.73325246 24.64560317,46.73329287 24.64548536,46.73335558 24.64534909,46.73342334 24.64521486,46.73349606 24.64508282,46.73357367 24.64495313,46.73365608 24.64482592,46.73374318 24.64470136,46.72797738 24.64360222,46.72778251 24.64356174,46.72758913 24.64351567,46.72739743 24.64346407,46.7272076 24.64340699,46.72701983 24.64334448,46.72214318 24.64176405,46.71994459 24.64106062,46.71958564 24.64093537,46.71922896 24.64080483,46.71887464 24.64066904,46.71852277 24.64052801,46.71817345 24.64038181,46.71782676 24.64023045,46.71781647 24.64029238,46.71777565 24.64050761,46.71772712 24.6407215,46.71767095 24.64093382,46.7176072 24.64114434,46.71753594 24.64135284,46.71676307 24.64303509,46.71553652 24.64568255,46.71509446 24.64663551,46.71510174 24.64664452,46.71513821 24.64669486,46.7151698 24.64674788,46.71519627 24.64680319,46.71521742 24.64686038,46.71523311 24.64691902,46.71523515 24.6470839,46.71524467 24.64724855,46.71526165 24.64741271,46.71528606 24.64757608,46.71531786 24.64773839,46.715357 24.64789935,46.71540341 24.64805869,46.71559148 24.64891057,46.71615269 24.65121898,46.7248791 24.64900056)
)'), 3, 10100003001, 'حي العمل', 'Al Amal Dist.', 1);
insert into `cities` (`center`, `city_id`, `name_ar`, `name_en`, `region_id`)
values
(ST_GeomFromText('POINT(46.73333003 24.69999996)'), 3, 'الرياض', 'Riyadh', 1);
It works great now
I generated this GeoJSON file from it:
{ "type": "Polygon", "coordinates": [ [ [ 46.7248791, 24.64900056 ], [ 46.7310504, 24.64742521 ], [ 46.73275344, 24.64701684 ], [ 46.73323508, 24.64690287 ], [ 46.73320262, 24.64676244 ], [ 46.73317722, 24.6466208 ], [ 46.73315892, 24.64647825 ], [ 46.73314778, 24.64633508 ], [ 46.73314857, 24.64621162 ], [ 46.73315606, 24.64608834 ], [ 46.73317024, 24.64596556 ], [ 46.73319107, 24.64584357 ], [ 46.7332185, 24.64572267 ], [ 46.73325246, 24.64560317 ], [ 46.73329287, 24.64548536 ], [ 46.73335558, 24.64534909 ], [ 46.73342334, 24.64521486 ], [ 46.73349606, 24.64508282 ], [ 46.73357367, 24.64495313 ], [ 46.73365608, 24.64482592 ], [ 46.73374318, 24.64470136 ], [ 46.72797738, 24.64360222 ], [ 46.72778251, 24.64356174 ], [ 46.72758913, 24.64351567 ], [ 46.72739743, 24.64346407 ], [ 46.7272076, 24.64340699 ], [ 46.72701983, 24.64334448 ], [ 46.72214318, 24.64176405 ], [ 46.71994459, 24.64106062 ], [ 46.71958564, 24.64093537 ], [ 46.71922896, 24.64080483 ], [ 46.71887464, 24.64066904 ], [ 46.71852277, 24.64052801 ], [ 46.71817345, 24.64038181 ], [ 46.71782676, 24.64023045 ], [ 46.71781647, 24.64029238 ], [ 46.71777565, 24.64050761 ], [ 46.71772712, 24.6407215 ], [ 46.71767095, 24.64093382 ], [ 46.7176072, 24.64114434 ], [ 46.71753594, 24.64135284 ], [ 46.71676307, 24.64303509 ], [ 46.71553652, 24.64568255 ], [ 46.71509446, 24.64663551 ], [ 46.71510174, 24.64664452 ], [ 46.71513821, 24.64669486 ], [ 46.7151698, 24.64674788 ], [ 46.71519627, 24.64680319 ], [ 46.71521742, 24.64686038 ], [ 46.71523311, 24.64691902 ], [ 46.71523515, 24.6470839 ], [ 46.71524467, 24.64724855 ], [ 46.71526165, 24.64741271 ], [ 46.71528606, 24.64757608 ], [ 46.71531786, 24.64773839 ], [ 46.715357, 24.64789935 ], [ 46.71540341, 24.64805869 ], [ 46.71559148, 24.64891057 ], [ 46.71615269, 24.65121898 ], [ 46.7248791, 24.64900056 ] ] ] }
you can preview it here http://geojson.io/#map=16/24.6457/46.7244
Thanks @usefksa, updated the sql files
Cheers, Aziz
well done, thanks for help.
Hello Abdulaziz, Thanks for the library. I tried the new updated but I found this incorrect value (it always happen))
The above format is not correct, it should be like this