-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.54..v0.2.55 changeset OSM_to_englishTDS61.js
Garret Voltz edited this page Aug 14, 2020
·
1 revision
diff --git a/translations/OSM_to_englishTDS61.js b/translations/OSM_to_englishTDS61.js
index 57dc810..0c2b4f6 100644
--- a/translations/OSM_to_englishTDS61.js
+++ b/translations/OSM_to_englishTDS61.js
@@ -30,49 +30,49 @@
//
// For the OSM+ to NFDD translation
-hoot.require('SchemaTools')
-hoot.require('tds61')
-hoot.require('tds61_schema')
-hoot.require('tds61_rules')
-hoot.require('fcode_common')
+hoot.require('SchemaTools');
+hoot.require('tds61');
+hoot.require('tds61_schema');
+hoot.require('tds61_rules');
+hoot.require('fcode_common');
// The main translation functions
-hoot.require('etds61')
-hoot.require('etds61_rules')
+hoot.require('etds61');
+hoot.require('etds61_rules');
-hoot.require('config')
-hoot.require('translate')
+hoot.require('config');
+hoot.require('translate');
// Create the output Schema - This is not used here. We _do_ use it in the etds functions but
// we don't need to expose it to the main Hoot program
function getDbSchema()
{
- return tds61.getDbSchema();
+ return tds61.getDbSchema();
}
// Get raw schema directly from translations/schema
function getRawDbSchema()
{
- return tds61.schema.getDbSchema();
+ return tds61.schema.getDbSchema();
}
function initialize()
{
- // Turn off the TDS structure so we just get the raw feature
- hoot.Settings.set({"ogr.thematic.structure":"false"});
+ // Turn off the TDS structure so we just get the raw feature
+ hoot.Settings.set({'ogr.thematic.structure':'false'});
- // Turn off the tds extra function
- hoot.Settings.set({"ogr.note.extra":"none"});
+ // Turn off the tds extra function
+ hoot.Settings.set({'ogr.note.extra':'none'});
- // Turn off the ESRI FCSUBTYPE
- hoot.Settings.set({"ogr.esri.fcsubtype":"false"});
+ // Turn off the ESRI FCSUBTYPE
+ hoot.Settings.set({'ogr.esri.fcsubtype':'false'});
- // Throw errors instead of returning partial translations/o2s_X features
- hoot.Settings.set({"ogr.throw.error":"true"});
+ // Throw errors instead of returning partial translations/o2s_X features
+ hoot.Settings.set({'ogr.throw.error':'true'});
- // Set the schema type for the export
- hoot.Settings.set({"osm.map.writer.schema":"TDSv61"});
+ // Set the schema type for the export
+ hoot.Settings.set({'osm.map.writer.schema':'TDSv61'});
}
@@ -86,18 +86,18 @@ function initialize()
//
function translateAttributes(attrs, layerName, geometryType)
{
- // We use the temp var because etds.toEnglish returns "attrs" and "tableName"
- var output = etds61.toEnglish(attrs,layerName,geometryType);
-
- // Make sure the returned value isn't NULL. This does occur
- if (output)
- {
- return output.attrs;
- }
- else
- {
- return null;
- }
+ // We use the temp var because etds.toEnglish returns "attrs" and "tableName"
+ var output = etds61.toEnglish(attrs,layerName,geometryType);
+
+ // Make sure the returned value isn't NULL. This does occur
+ if (output)
+ {
+ return output.attrs;
+ }
+ else
+ {
+ return null;
+ }
} // End of Translate Attributes
@@ -106,5 +106,5 @@ function translateAttributes(attrs, layerName, geometryType)
// This version converts OSM+ tags to NFDD "English" attributes
function translateToOgr(tags, elementType, geometryType)
{
- return etds61.toEnglish(tags, elementType, geometryType)
+ return etds61.toEnglish(tags, elementType, geometryType);
} // End of translateToOgr