Wikidata:Property proposal/Coordinates in WKT

From Wikidata
Jump to navigation Jump to search

Coordinates in WKT[edit]

Originally proposed at Wikidata:Property proposal/Place

   Not done
Descriptioncoordinates of this object in well-known text representation of geometry (Q4018860) format
Representswell-known text representation of geometry (Q4018860)
Data typeString
Domainareas/lines etc. (non-points)
Example 1Carnegie Hill (Q1043965) -> POLYGON ((-73.954816460609 40.789203141995, -73.955280482769 40.788579699067, -73.95577400922799 40.787907511372, -73.95627021789601 40.787225162826, -73.95672082901 40.786601701327, -73.957176804543 40.785978233976, -73.957640826702 40.785344606436, -73.958096802235 40.784719096397, -73.958555459976 40.784087487749, -73.959011435509 40.78345790402, -73.95947277545901 40.782830345267, -73.959918022156 40.782214966363, -73.960414230824 40.781544745228, -73.95881026983299 40.780868424319, -73.957187533379 40.780186003449, -73.95557820797001 40.779507637659, -73.953979611397 40.778833327074, -73.95349413156499 40.779495451384, -73.953032791615 40.780123041646, -73.952576816082 40.780752656987, -73.952115476131 40.781380235371, -73.95165950059901 40.782007807825, -73.95120620727501 40.78262725055, -73.950744867325 40.783260904015, -73.950283527374 40.783890489611, -73.949846327305 40.78449163674, -73.94933134317399 40.785196352966, -73.948832452297 40.785870598955, -73.94838184118299 40.786500159812, -73.94996702671099 40.78716830013, -73.95146369934101 40.787793787101, -73.953223228455 40.788532991381, -73.954816460609 40.789203141995))
Example 2Istra Parish (Q6089022) -> MULTIPOLYGON (((27.8114 56.1951, 27.8076 56.1977, 27.8138 56.197, 27.8232 56.1998, 27.8212 56.2117, 27.8231 56.2241, 27.8323 56.2278, 27.8413 56.2275, 27.8439 56.232, 27.8421 56.2361, 27.8343 56.2368, 27.8381 56.2406, 27.8578 56.2606, 27.8715 56.2603, 27.8702 56.2684, 27.881 56.2689, 27.8887 56.2731, 27.9015 56.2747, 27.9063 56.2688, 27.9184 56.269, 27.9379 56.2769, 27.9386 56.2837, 27.936 56.289, 27.9281 56.2902, 27.9402 56.3019, 27.9504 56.3038, 27.9562 56.3012, 27.9672 56.3003, 27.9768 56.3001, 27.9851 56.306, 27.988 56.3132, 28.0102 56.3127, 28.0294 56.3142, 28.0381 56.3075, 28.0475 56.3024, 28.0455 56.2967, 28.0467 56.2929, 28.0547 56.2877, 28.0683 56.2847, 28.0935 56.2836, 28.0915 56.2735, 28.1002 56.2703, 28.1142 56.2593, 28.1169 56.2492, 28.1022 56.2333, 28.0962 56.2235, 28.09 56.2216, 28.0748 56.2203, 28.0745 56.2146, 28.0691 56.2123, 28.0731 56.2066, 28.0667 56.2028, 28.0556 56.2032, 28.0518 56.2096, 28.0618 56.2144, 28.0552 56.2176, 28.0371 56.2155, 28.0059 56.2105, 28.0022 56.2037, 27.9823 56.1969, 27.9597 56.1946, 27.9537 56.198, 27.94 56.1987, 27.9162 56.1911, 27.9139 56.1887, 27.916 56.1828, 27.906 56.179, 27.8935 56.1848, 27.8959 56.1917, 27.8893 56.1953, 27.8827 56.1953, 27.8651 56.1877, 27.8582 56.1793, 27.8487 56.1773, 27.8221 56.1859, 27.8186 56.1887, 27.8191 56.1946, 27.8114 56.1951)))
Example 3The El Dorado (Q850377) -> MULTIPOLYGON (((-73.96780484915345 40.78870352487395, -73.96772915278757 40.78867158815345, -73.96772072568622 40.78868312751259, -73.9672177682772 40.788470926605754, -73.96732430265111 40.788325058609225, -73.96757005740507 40.787988567612466, -73.96816636868412 40.78824015461601, -73.96806239118712 40.788382523854025, -73.96803579690763 40.788371304345056, -73.96799493513026 40.7884272537308, -73.96781814507344 40.78835266464139, -73.96786724666164 40.788285433438716, -73.96764778519437 40.78819284197438, -73.96760587159555 40.78825023082945, -73.96767850064056 40.788280874554246, -73.96760882792321 40.78837627206672, -73.96760403937697 40.7883828272676, -73.96759101649705 40.788377332351985, -73.96753141025457 40.78835218439684, -73.96750949600803 40.78838219011412, -73.9674881828311 40.788411372938874, -73.9677096798486 40.78850482435197, -73.96778558630133 40.78840089177481, -73.967794364973 40.78840459528682, -73.96793768571976 40.78846506335712, -73.96786968958304 40.788558165213736, -73.96789566794305 40.78856912524488, -73.96788416194728 40.78858488080388, -73.967853492309 40.78862687251297, -73.96785910352602 40.78862923879314, -73.96780484915345 40.78870352487395)))
Planned useWill do some import for Latvia-specific places and global items (countries e.g.)
See alsogeoshape (P3896)

Motivation[edit]

We currently can't set geometry of non-point objects. Although this may be the main job for OSM, information can be stored in Wikidata. And we can make prettier maps in SPARQL. P.S. Will add examples when will be at computer, which has software installed (tomorrow). Edgars2007 (talk) 10:40, 21 October 2018 (UTC)[reply]

Discussion[edit]

@Edgars2007: What's wrong with using GeoJSON on Commons? I believe that's what some of the geographic maps on SPARQL already use. Also I'm not sure any values for this property will fit within the 400-character limit for string/external-id values. Mahir256 (talk) 16:57, 21 October 2018 (UTC)[reply]

@Mahir256: hmm, missed geoshape (P3896) somehow. What I don't like in that solution, is that it's split one by one. I can't have it in one place. So if I need to have data for all countries, i have to download 200 files, can't have simply one query to list all geometries. Agree on 400 character problem (is that really the limit?). There could be room for improvements. Reduced precision, which would be fine, because 10-14 places after decimal point is somewhere few mm precision. Also geometry simplification, but that would be bad :D Also we could encode them. --Edgars2007 (talk) 21:29, 22 October 2018 (UTC)[reply]
@Edgars2007: According to RFC 7946: The GeoJSON Format (Q47468299), you can wrap various (multi)lines/points/polygons into GeometryCollections (and, if wrapped in features, into FeatureCollections), allowing for the inclusion of various separate coordinate objects in a single GeoJSON file. (A nice example of this—on mw:Help:Map Data, no less—may be found at c:Data:Neighbourhoods/New York City.map.) Perhaps that allays your concerns about the geoshape property? Mahir256 (talk) 03:37, 17 December 2018 (UTC)[reply]

 Not done Not enough support.--Micru (talk) 15:15, 19 December 2018 (UTC)[reply]