Technical Specification
A very high level start to an XOMGL (eXtensible Open Municipal Geodata Language - XML) technical specification to get the ball rolling. Can also be output in JSON and CSV formats.Why Not Use An Existing Standard?
So why not just use an existing data standard? Well, as far as we know, there is not a standard that is made for this purpose, defining the optimal fields for data sharing.Data Formats
OMG data fields can be output and stored in any number of data formats, including CSV, RSS, XML, KML, JSON, MySQL tables, etc. We recommend initial output and storage be in CSV, JSON, or XML since they have the most granular fields. KML and RSS is more suited to the final machine-output of the data, with styles included, not really for data transfer and export from city databases. Many fields like Name, Description, and Data must get merged into a single un-parsable field in these formats. Another limitation of KML or GeoRSS is lack of Latitude and Longitude from government sources, which is a required part of those formats, but optional under our standard.Field Introduction
High-level examples of the data fields used for a single location.Required Location Details
- Unique ID - Identifies the location so you can update it later if needed. Examples: "26", "342ax", "DJWU-339832-KS"
- Name - Descriptive short title of the location/marker. Examples: "Assault with a Weapon (2 counts)", "City Cafe - Rating B+", "John Doe Smith - Unregistered"
- Address - Street address of the location. Examples: "624 West Main St", "Baxter Ave and Cherokee Parkway", "Everett Ave"
- City - City name of the location. Examples: "Louisville", "Queens", "Fargo"
- State - State of the location. Examples: "KY", "NY", "CA"
- Category ID - ID of the category this belongs to. Categories can be anything, like crime types, permit codes, or grades. This number ID just identifies them for your data. Examples: "1", "7", "23"
- Latitude - Latitude coordinate of the location. Examples: "37.392984392"
- Longitude - Longitude coordinate of the location. Examples: "-84.239837184"
Optional Location Details
- Description - Detailed HTML description. Example: "Sex: Male‹br/›Race: White‹br/›Details: Suspect attempted to rob victim at gunpoint."
- Address 2 - Extra information about the location. Examples: "Apt 2", "USA Town Mall", "On the sidewalk"
- Zip - Zip code of the location. Examples: "40206"
- Date - ISO formatted date of the event/review/etc. Examples: "2005-09-28", "2009-02-01"
- Full URL - Link to a page on your site with more information. Examples: "http://www.mywebsite.com/detailpage/infoonmyplace.htm"
- Image Path - Full path to an image on your site. Examples: "http://www.mywebsite.com/images/locationimage2918.jpg"
- Detail Link - True or false to show if this location links to a dynamic page on your site that uses your Unique ID. Examples: "1", "0" for "http://www.mywebsite.com/detailpage/info.asp?id=[Unique ID]"
- Details - Extended HTML description of your location for the detail page. This can be very long if needed. Example: "See case 29491-OE for more details..."
OMG Spreadsheet Example
Download this spreadsheet to get started formatting your data by seeing a few examples.Wikipedia
XOMGL Wikipedia ArticleEmpty XOMGL
All possible fields with commentsView XML
<?xml version="1.0" encoding="utf-8"?> <dataset name=""> <!-- * name:string - name of the dataset --> <metadata> <!-- * metadata about the dataset --> <sourcename><!-- * string: name of the source of the data --></sourcename> <sourceurl><!-- string: full path to the page that has the source data --></sourceurl> <sourcecity><!-- string: name of the originating city --></sourcecity> <sourcestateid><!-- int: id of the originating state --></sourcestateid> <sourcecountryid><!-- int: id of the originating country --></sourcecountryid> <description><!-- string: text description of source of the data --></description> <updatefrequency><!-- string: frequency of data updates, daily, monthly, weekly, etc --></updatefrequency> <lastupdated><!-- datetime: stamp of last update to this dataset --></lastupdated> <startdatetime><!-- datetime: earliest date of data coverage --></startdatetime> <enddatetime><!-- datetime: latest date of data coverage --></enddatetime> </metadata> <locationdata> <!-- * location based information --> <centercity><!-- string: name of the city of the data center --></centercity> <centerstateid><!-- int: id of the state of the data center --></centerstateid> <centercountryid><!-- int: id of the country of the data center --></centercountryid> <centerlatitude><!-- float: latitude of center --></centerlatitude> <centerlongitude><!-- float: longitude of center --></centerlongitude> <coveragecity><!-- string: city of the dataset coverage area. Leave out if coverage area is greater --></coveragecity> <coveragestateid><!-- int: id of the state of the dataset coverage area. Leave out if coverage area is greater --></coveragestateid> <coveragecountryid><!-- * int: id of the country of the dataset coverage area. --></coveragecountryid> <minlatitude><!-- float: based on data coverage area --></minlatitude> <maxlatitude><!-- float: based on data coverage area --></maxlatitude> <minlongitude><!-- float: based on data coverage area --></minlongitude> <maxlongitude><!-- float: based on data coverage area --></maxlongitude> </locationdata> <itemdata> <!-- data concerning all items --> <externalurl><!-- full path to more info with [ExternalID] in place of item->id in a url --></externalurl> </itemdata> <categories> <!-- category to id relationship for a dataset --> <category> <categoryid><!-- int: id of categorization of item. --></categoryid> <categoryname><!-- string: short name of category. --></categoryname> </category> <category> <categoryid><!-- int: id of categorization of item. --></categoryid> <categoryname><!-- string: short name of category. --></categoryname> </category> </categories> <item> <!-- * one item of data. there can be many of these --> <id><!-- * string: unique id of this item based on internal system id. used for updating data later --></id> <name><!-- * string: name of the item --></name> <description><!-- string: html formatted or plain text full description of item --></description> <categories> <!-- one or more categories the item can be classified as. id links to other xml formatted data that shows category name--> <categoryid><!-- int: id of categorization of item. --></categoryid> </categories> <!-- * Note: one of the following must be provided: (location) or (address, city, state) or (latitude, longitude) --> <location><!-- string: full text string of location. this can be used instead of address, city, state, zip--></location> <address><!-- string: street address with house number --></address> <address2><!-- string: more detailed street address info or location description --></address2> <city><!-- string: city of item location --></city> <state><!-- string: state of item location --></state> <zip><!-- string: zip code of item location --></zip> <date><!-- date: date associated with item --></date> <latitude><!-- float: latitude of item location --></latitude> <longitude><!-- float: longitude of item location --></longitude> <fullurl><!-- string: full path to more information about this item --></fullurl> <imagepath><!-- string: full path to location of image on a server --></imagepath> <detaillink><!-- boolean: if true, will us item->id to link to another XML dataset with full details --></detaillink> </item> </dataset>
Minimum XOMGL
Minimum required fields with commentsView XML
<?xml version="1.0" encoding="utf-8"?> <dataset name=""> <!-- * name:string - name of the dataset --> <metadata> <!-- * metadata about the dataset --> <sourcename><!-- * string: name of the source of the data --></sourcename> </metadata> <locationdata> <!-- * location based information --> <coveragecountryid><!-- * int: id of the country of the dataset coverage area. --></coveragecountryid> </locationdata> <item> <!-- * one item of data. there can be many of these --> <id><!-- * string: unique id of this item based on internal system id. used for updating data later --></id> <name><!-- * string: name of the item --></name> <!-- * Note: one of the following must be provided: (location) or (address, city, state) or (latitude, longitude) --> <location><!-- string: full text string of location. this can be used instead of address, city, state, zip--></location> </item> </dataset>
Example: Crimes
An example of a crime datasetView XML
<?xml version="1.0" encoding="utf-8"?> <dataset name="Crime Reports"> <metadata> <sourcename>Louisville Metro Police Department</sourcename> <sourceurl>http://www.louisvilleky.gov/MetroPolice/default.htm</sourceurl> <sourcecity>Louisville</sourcecity> <sourcestateid>18</sourcestateid> <sourcecountryid>216</sourcecountryid> <description>All reported crimes for the city of Louisville in Jefferson County, Kentucky, since 2002.</description> <updatefrequency>Weekly</updatefrequency> <lastupdated>2008-05-19 03:23:24.22</lastupdated> <startdatetime>2002-01-01 02:11:15.97</startdatetime> <enddatetime>2008-05-18 23:15:54.22</enddatetime> </metadata> <locationdata> <centercity>Louisville</centercity> <centerstateid>18</centerstateid> <centercountryid>216</centercountryid> <coveragecity>Louisville</coveragecity> <coveragestateid>18</coveragestateid> <coveragecountryid>216</coveragecountryid> <minlatitude>33.8232387</minlatitude> <maxlatitude>34.2312221</maxlatitude> <minlongitude>-85.3871842</minlongitude> <maxlongitude>-84.1028518</maxlongitude> </locationdata> <item> <id>C34928341</id> <name>Assault</name> <description><![CDATA[Assault with a Deadly Weapon, 2nd Degree<br>Time: 1:40 AM<br>Race: White<br>Sex: M<br>Born: Nov 24, 1979]]> </description> <categories> <categoryid>21</categoryid> </categories> <address>Baxter Ave And Tyler Park Dr</address> <city>Louisville</city> <state>KY</state> <date>2008-04-15</date> <detaillink>1</detaillink> </item> </dataset>
Example: Pollution Sources
An example of a pollution source datasetView XML
<?xml version="1.0" encoding="utf-8"?> <dataset name="EPA Toxic Pollution Sources"> <metadata> <sourcename>Environmental Protection Agency</sourcename> <sourceurl>http://www.epa.gov/tri/tridata/index.htm</sourceurl> <sourcecountryid>216</sourcecountryid> <description>All sources of toxic pollution from the EPA's monitoring and reporting system from 2006-2007</description> <updatefrequency>Yearly</updatefrequency> <lastupdated>2008-01-30 03:23:24.22</lastupdated> <startdatetime>2006-01-01 02:11:15.97</startdatetime> <enddatetime>2007-12-31 23:15:54.22</enddatetime> </metadata> <locationdata> <centerstateid>17</centerstateid> <centercountryid>216</centercountryid> <coveragecountryid>216</coveragecountryid> <minlatitude>15.82323</minlatitude> <maxlatitude>63.23122</maxlatitude> <minlongitude>-178.38718</minlongitude> <maxlongitude>-63.10285</maxlongitude> </locationdata> <itemdata> <externalurl>http://www.epa.gov/tri/tridata/datapoint/source.aspx?id=[ExternalID]</externalurl> </itemdata> <item> <id>439-B.3148253</id> <name>HEXION SPECIALTY CHEMICALS INC.</name> <description><![CDATA[Emissions (pounds): 12,500<br>Major Toxic Chemical: Hexaflorine]]> </description> <categories> <categoryid>3</categoryid> <categoryid>4</categoryid> </categories> <address>7635 National Turnpike Unit 130</address> <address2>Campmore Building</address2> <city>Kansas City</city> <state>KA</state> <latitude>45.39281332</latitude> <longitude>-152.34718334</longitude> </item> </dataset>
