[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [geomesa-users] Seeing addfeatures change the fids in a collection
|
Hi Dave,
Are you setting the provided FID hint? We follow the geotools
convention, where we will only use the existing feature ID if the
following hint is set in the feature user data:
http://docs.geotools.org/latest/javadocs/org/geotools/factory/Hints.html#USE_PROVIDED_FID
Thanks,
Emilio
On 04/10/2017 08:17 PM, David Boyd wrote:
All:
Another one of my off the wall questions. When I am creating features
I am specifying my own fid. I gather these all in a collection, then
call addfeatures to persist them to the datastore.
But it looks like the call to: FeatureUtils.copyToWriter in
addfeatures is changing the fid.
Below are my variables from an eclipse debugging session.
You can see that the collection as one feature with a fid of
"73b6d329...."
in the pasted output below.
But in the fids list populated by toWrite.getIdentifier() has a
different fid.
Why would copyToWriter change the fid?
Am I doing something wrong creating the features?
this GeoMesaFeatureStore (id=283)
collection DefaultFeatureCollection (id=234)
features SimpleFeatureIteratorImpl (id=293)
collection TreeMap$Values (id=299)
[0] SimpleFeatureImpl (id=236)
attributeUserData null
featureType SimpleFeatureTypeImpl (id=233)
id FeatureIdImpl (id=241)
fid "73b6d329-135f-4962-9716-daef5ad6896f" (id=244)
origionalFid null
index HashMap<K,V> (id=242)
userData HashMap<K,V> (id=330)
validating false
values Object[9] (id=243)
iterator TreeMap$ValueIterator (id=302)
writer AccumuloAppendFeatureWriter (id=311)
fids ArrayList<E> (id=315)
[0] FeatureIdImpl (id=336)
fid "20fa2382-4120-4904-8fa0-b2fe4a71befd" (id=337)
origionalFid "1" (id=338)