View source: Geodata
Views
Page
View source
You can view and copy the source of this page:
The geographical coordinate tools are all currently experimental at the moment. == Access == Dump are available upon request, this maybe automated in the future if there's demand. Toolserver user can access these database by connecting to the server for their respective wikis. [[tswiki:phpMyAdmin|phpMyAdmin]] will helps introduce users to layout of the tables. <pre> SELECT page_id, gc_lat, gc_lon, gc_region, page_title FROM u_dispenser_p.coord_enwiki JOIN page ON page_id = gc_from WHERE page_namespace=0 AND gc_from NOT IN (SELECT DISTINCT il_from from imagelinks) limit 100; </pre> The above query yields the first 100 pages have geographical coordinate but lack images, optimization and more sophisticated image analysis is left as an exercise for the reader. == Known usage == === locateCoord.py === <a href="/~dispenser/cgi-bin/locateCoord.py">'''locateCoord.py'''</a> very simple and quickly code tool to give uses the ability to retrieve the data from the database. The [http://toolserver.org/~dispenser/cgi-bin/locateCoord.py?dbname=coord_enwiki&lon=-74&lat=40.716667&range_km=5 this query] will give coordinates that are 5 km near the center of New York City. Eventually a rewrite will be needed with support for JSON/XML/YMAL/etc. with better option support as the current arcutecture is limited. : [http://toolserver.org/~dispenser/sources/locateCoord.py locateCoord.py source code] === geosearch.py === <a href="/~dispenser/cgi-bin/geosearch.py">'''geosearch.py'''</a> is a simple tool to assist in tracking down pages from which common error or inapporate data is entered into. Other languages/database is suport with the paramter <code>&site=''languageprefix''</code> (ex: commons, de, fr, ...). [[Wikipedia:WikiProject Geographical coordinates/coordinates search tool|More Examples]] : [http://toolserver.org/~dispenser/sources/geosearch.py geosearch.py source code] === iwccoord.py === '''iwcoord.py''' find possible coordinates that can be copied from one language to another, doesn't actually use ghel or the database. : [http://toolserver.org/~dispenser/sources/iwcoord.py iwcoord.py source code] === regioncheck.py === '''regioncheck.py''' produces reports using [http://geodata.grid.unep.ch/results.php Administrative Boundaries - First Level (ESRI)] dataset retrieves all state boundary polygons and find the shortest distance to each one. If the point is found inside it skips it a moves to the next point. This way it gives the shortest distance to all points outside of the country. === [[de:Wikipedia:WikiProjekt Georeferenzierung/Wikipedia-World |Wikipedia-World]] === It is [[User_talk:Dispenser#geo_datas|reported]] data is being used from here on the project project == Logs == Error and warning outputted from the tool are available at <span>http://toolserver.org/~dispenser/logs/</span>. Error are items ghel could not parse, while warning are things it could parse but should be corrected for other programs to read correctly. == Things left to do == * Develop an API capable of writing out in HTML, JSON, serialized PHP, KML, OSM, and XML. * Language independent article ranking table (length, incoming links, interwiki links) * Reset primary bit for multiple primary coordinates form the same article * WikiMiniAltas/OSM data integration under heavy load without killing the databases. * Reimplemented features into GeoHack. * Documentation, source code should be documented so a novice could understand it. * Live updating, MySQL triggers functionality is required for this. == Fields == '' This section is rough draft of definitions'' ; gc_from : Article ID ; gc_lat : latitude ; gc_lon : Longitude ; gc_alt : Elevation in meters above the sea level ; gc_head : The direction in degree from north (if applicable) ; gc_dim : The rough size of the object ; gc_type : [[WP:GEO/#Type:]] ; gc_size : City population size ; gc_globe : Which body are the coordinates on (NOTE get standards for other bodies) ; gc_primary : Where the coordinate represents the primary object in the Photo or article (TODO word this better) ; gc_name : The Name of the object, if none is given then the article title will be used ; gc_location : MBR point binary == Schema summary == <pre> mysql> describe coord_dewiki; +-------------+----------------------------------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+----------------------------------------------------------+------+-----+---------+-------+ | gc_from | int(8) unsigned | NO | MUL | NULL | | | gc_lat | float | NO | | NULL | | | gc_lon | float | NO | | NULL | | | gc_alt | float | YES | | NULL | | | gc_head | float | YES | | NULL | | | gc_dim | float unsigned | YES | | NULL | | | gc_type | varchar(63) | YES | | NULL | | | gc_size | float | YES | | NULL | | | gc_region | varchar(127) | YES | | NULL | | | gc_globe | enum('','mercury','venus','earth','moon','mars','ceres') | YES | | earth | | | gc_primary | tinyint(1) | NO | | 0 | | | gc_name | varchar(255) | NO | | NULL | | | gc_location | point | NO | MUL | NULL | | +-------------+----------------------------------------------------------+------+-----+---------+-------+ 13 rows in set </pre> == Dumps == The database is dump weekly and is accessible from http://toolserver.org/~dispenser/dumps/ as compressed sql dumps. Dumping is schedule for Thursdays at 9:40 UTC. == Source code == * [http://toolserver.org/~dispenser/sources/geodbcompiler.py geodbcompiler.py] - Simple application to create and fill the database with the geographic data * [http://toolserver.org/~dispenser/sources/ghel.py ghel.py] - GeoHack External Link parsing library
Interaction
Main page
Recent changes
Help
Tools
Altviewer
Checklinks
Dablinks
Dab solver
Peer reviewer
Reflinks
Frameworks
File viewer
Geodata
Pywikipedia
Interaction
Preferences