Bugfix in ShapeFileImporter: Spaces are now removed from node IDs and edge IDs git-svn-id: http://dev.eclipse.org/svnroot/technology/org.eclipse.stem/branches/STEM_1_4_1@3633 92a21009-5b66-0410-b83a-dc787c41c6e9
diff --git a/core/org.eclipse.stem.graphgenerators/src/org/eclipse/stem/graphgenerators/impl/ShapefileGraphGeneratorImpl.java b/core/org.eclipse.stem.graphgenerators/src/org/eclipse/stem/graphgenerators/impl/ShapefileGraphGeneratorImpl.java index bcaec19..c454c47 100644 --- a/core/org.eclipse.stem.graphgenerators/src/org/eclipse/stem/graphgenerators/impl/ShapefileGraphGeneratorImpl.java +++ b/core/org.eclipse.stem.graphgenerators/src/org/eclipse/stem/graphgenerators/impl/ShapefileGraphGeneratorImpl.java
@@ -482,6 +482,10 @@ String currentID = data.get(i).get( columnNames.indexOf(regionID.replaceFirst( "column:", ""))); + + // Remove spaces from ID, cause it will be used as part of URI + currentID = currentID.replace(" ", ""); + Region regionNode = createRegionNode(currentID); LatLong nodeSegments = createSTEMPolygon(polygon); String spatialURIString = InlineLatLongDataProvider @@ -547,6 +551,10 @@ String currentID = data.get(i).get( columnNames.indexOf(roadID.replaceFirst("column:", ""))); + + // Remove spaces from ID, cause it will be used as part of URI + currentID = currentID.replace(" ", ""); + String currentClass = null; if (roadClass.startsWith("column:")) { @@ -623,6 +631,10 @@ String currentID = data.get(i).get( columnNames.indexOf(migrationID.replaceFirst( "column:", ""))); + + // Remove spaces from ID, cause it will be used as part of URI + currentID = currentID.replace(" ", ""); + String currentPopulation = null; double currentRate = 0.0;