Dan Thomas wrote:
> It seems the degree symbol is required for SMW to recognize a geographic 
> coordinate.  US keyboards typically don't include this symbol making 
> entry difficult for end users.  I suggest supporting lat/long in 
> positive/negative decimal degrees as an alternative input form.  e.g.; 
> 38.926832, -77.03201 for Washington, DC.

You can enter positive/negative decimal degrees in SMW 1.0 RC1, but 
you're right that you must provide the degree symbol ° or its HTML 
numeric entity code °.  I filed enhancement bug 11679.

I updated http://ontoworld.org/wiki/Type:Geographic_coordinate with, I 
believe, all the supported characters and separators.  You could tell 
users to copy and paste then modify a working format from that page.

Changing the code to not requiring a degree symbol is tricky.  I think 
the code needs a degree symbol to give it something to split on.  Note 
that in some languages comma is also a decimal separator 
(smw_decseparator in the languages file) so you can't split into two 
parts on comma.  Is there some other standard compact format for 
coordinates?  Some tests are at 
http://ontoworld.org/wiki/Geographic_coordinate_test
This isn't a regression from 0.7, it doesn't work there either.

As a workaround you could use a template like 
http://en.wikipedia.org/wiki/Template:Coord and insert the degree 
symbols in the semantic annotation it generates.

You can't use the character entity reference for degree (°) and some 
other entities and decimal references for minutes and seconds, which 
seems an accidental oversight.  I came up with a patch to 
SMW_DV_GeoCoords.php for that.

--
=S Page

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to