public class OSMContribution extends Object implements OSHDBMapReducible
It holds the information about:
| Constructor and Description |
|---|
OSMContribution(CellIterator.IterateAllEntry data) |
OSMContribution(OSMContribution other,
org.locationtech.jts.geom.Geometry reclippedGeometryBefore,
org.locationtech.jts.geom.Geometry reclippedGeometryAfter)
Creates a copy of the current entity snapshot with an updated geometry.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getChangesetId()
Returns the osm changeset id of the contribution.
|
EnumSet<ContributionType> |
getContributionTypes()
Determined the type of modification this contribution has made.
|
int |
getContributorUserId()
Returns the user id of the osm contributor responsible for this data modification.
|
OSMEntity |
getEntityAfter()
Returns the entity object in its state after this modification.
|
OSMEntity |
getEntityBefore()
Returns the entity object in its state before this modification.
|
org.locationtech.jts.geom.Geometry |
getGeometryAfter()
Returns the geometry of the entity after this modification clipped to the requested area of
interest.
|
org.locationtech.jts.geom.Geometry |
getGeometryBefore()
Returns the geometry of the entity before this modification clipped to the requested area of
interest.
|
org.locationtech.jts.geom.Geometry |
getGeometryUnclippedAfter()
Returns the geometry of the entity after this modification.
|
org.locationtech.jts.geom.Geometry |
getGeometryUnclippedBefore()
Returns the geometry of the entity before this modification.
|
OSHEntity |
getOSHEntity()
The (parent) osh entity of the osm entities involved in this contribution.
|
OSHDBTimestamp |
getTimestamp()
Returns the timestamp at which this data modification has happened.
|
boolean |
is(ContributionType contributionType)
Checks if this contribution is of the given contribution type.
|
public OSMContribution(CellIterator.IterateAllEntry data)
public OSMContribution(OSMContribution other, org.locationtech.jts.geom.Geometry reclippedGeometryBefore, org.locationtech.jts.geom.Geometry reclippedGeometryAfter)
public OSHDBTimestamp getTimestamp()
public org.locationtech.jts.geom.Geometry getGeometryBefore()
public org.locationtech.jts.geom.Geometry getGeometryUnclippedBefore()
public org.locationtech.jts.geom.Geometry getGeometryAfter()
public org.locationtech.jts.geom.Geometry getGeometryUnclippedAfter()
public OSMEntity getEntityBefore()
public OSMEntity getEntityAfter()
If this is a entity deletion, the returned entity will have the visible flag set to false: `entity.getEntityAfter().isVisible == false`
public OSHEntity getOSHEntity()
public boolean is(ContributionType contributionType)
It can be one or more of:
If this is a entity creation or deletion, the other flags are not set (even though one might argue that a just created object clearly has a different geometry than before, for example).
public EnumSet<ContributionType> getContributionTypes()
Can be one or more of:
If this is a entity creation or deletion, the other flags are not set (even though one might argue that a just created object clearly has a different geometry than before, for example).
public int getContributorUserId()
This user id can be different from what one gets by calling `.getEntityAfter().getUserId()` if the contribution is a pure geometry change (i.e. the entity itself has not ben modified, but one or more of its child entities):
If the entity is a way or relation, and in a contribution *"only"* the geometry has been changed, we can't find out the respective contributor's user id only by looking at the entity alone – instead, we need to iterate over all the entity's children to find the actual contributor's user id.
public long getChangesetId()
Copyright © 2016–2020 HeiGIT. All rights reserved.