8000 OSM relations · Issue #726 · gama-platform/gama · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
OSM relations #726
Open
Open
@benoitgaudou

Description

@benoitgaudou

Is your request related to a problem? Please describe.
In the Java code of the OSM reader, there is the following method to manage the OSM relations, with the line:
wayValues.put("gama_bus_line", values.get("name"));

private void manageNormalRelation(final IScope scope, final Relation relation, final IList<IShape> geometries,
		final Map<Long, Entity> geomMap, final Map<String, Object> values, final Map<Long, GamaShape> nodesPt,
		final Set<Long> intersectionNodes) {
	int order = 0;
	for (final RelationMember member : relation.getMembers()) {
		final Entity entity = geomMap.get(member.getMemberId());
		if (entity instanceof Way) {
			final List<WayNode> relationWays = ((Way) entity).getWayNodes();
			final Map<String, Object> wayValues = GamaMapFactory.create();
			wayValues.put("entity_order", order++);
			**// TODO FIXME AD: What's that ??
			wayValues.put("gama_bus_line", values.get("name"));**
			wayValues.put("osm_way_id", entity.getId());
			if (relationWays.size() > 0) {
				final List<IShape> geoms = createSplitRoad(relationWays, wayValues, intersectionNodes, nodesPt);
				geometries.addAll(geoms);
			}
		} else if (entity instanceof Node) {
			final GamaShape pt = nodesPt.get(entity.getId());
			final GamaShape pt2 = pt.copy(scope);

			final List objs = GamaListFactory.create(Types.GEOMETRY);
			objs.add(pt2);

			pt2.setAttribute("gama_bus_line", values.get("name"));

			geometries.add(pt2);

		}
	}
}

This allows the modeler to manage the facts that an object is a relation or simple object. But the name (gama_bus_line) is misleading as relations in OSM can be many more things than bus lines (as far as I understand well the concept of relations in OSM ... )

Describe the improvement you'd like
change the name of the attribute, or explain why this is only bus lines

Metadata

Metadata

Assignees

Labels

About DataData files, data exportation, databasesEnhancement 🤗This is a request for enhancement

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0