GeoTools
  1. GeoTools
  2. GEOT-497

VPFFeatures need better FIDs.

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.M3
    • Fix Version/s: 2.7-M0
    • Component/s: vpf plugin
    • Labels:
      None

      Description

      Features from the VPF reader, at least the ones I tested, just used the default feature constructor, which creates features with out good fids. I don't know the spec that well, but in the sample data I have everything seems to have an 'id' field, which if it's universal could just be used. Or we could do something like shapefile with line numbers. I leave this to someone who knows the specs better.

        Activity

        Hide
        Jeff Yutzler added a comment -
        I do not have "permission" to work on this issue, but I updated VPFFeatureClass with a fix. Note that in VPF, the feature ID tends to be the first attribute, called "id."
        Show
        Jeff Yutzler added a comment - I do not have "permission" to work on this issue, but I updated VPFFeatureClass with a fix. Note that in VPF, the feature ID tends to be the first attribute, called "id."
        Hide
        Jeff Yutzler added a comment -
        In looking at this more closely, there is a tricky timing issue. DefaultFeatureType will only allow its ID to be set in the constructor. However, the VPF geometry factory mechanism requires a feature object with many of its values filled. If I wait to construct the feature until after all of the values are known, it will be too late for the geometry factory.
        It looks like this will require a two-pass approach (how typical of this VPF stuff!). The first pass will extract the ID and construct an empty feature object with the ID. The second pass will insert appropriate values into the feature.

        At least the spec appears to be consistent in terms of what the primary keys are called.
        Show
        Jeff Yutzler added a comment - In looking at this more closely, there is a tricky timing issue. DefaultFeatureType will only allow its ID to be set in the constructor. However, the VPF geometry factory mechanism requires a feature object with many of its values filled. If I wait to construct the feature until after all of the values are known, it will be too late for the geometry factory. It looks like this will require a two-pass approach (how typical of this VPF stuff!). The first pass will extract the ID and construct an empty feature object with the ID. The second pass will insert appropriate values into the feature. At least the spec appears to be consistent in terms of what the primary keys are called.
        Hide
        Jeff Yutzler added a comment -
        The "id" attribute is unique within a single feature type for that library. I can prepend the FACC code to make the feature ID unique for that library. I don't have an obvious way to make feature IDs unique across libraries. Is that good enough? If so, I can commit the change.
        Show
        Jeff Yutzler added a comment - The "id" attribute is unique within a single feature type for that library. I can prepend the FACC code to make the feature ID unique for that library. I don't have an obvious way to make feature IDs unique across libraries. Is that good enough? If so, I can commit the change.
        Hide
        Chris Holmes added a comment -
        Yeah, that's definitely good enough. At least if my understanding of 'library' is correct. We only need uniqueness per featureType. Just prepend the featureType's name (we do this for all other datastores - it's sort of implied by the WFS specification). Then the id is unique per featureType. Cross libraries, if you're displaying them through WFS then it's up to the admin to put them each in their own namespace.

        Actually, yeah, you don't even need to prepend the FACC code, just prepend the typename.
        Show
        Chris Holmes added a comment - Yeah, that's definitely good enough. At least if my understanding of 'library' is correct. We only need uniqueness per featureType. Just prepend the featureType's name (we do this for all other datastores - it's sort of implied by the WFS specification). Then the id is unique per featureType. Cross libraries, if you're displaying them through WFS then it's up to the admin to put them each in their own namespace. Actually, yeah, you don't even need to prepend the FACC code, just prepend the typename.
        Hide
        Michael Bedward added a comment -
        VPF module no longer supported
        Show
        Michael Bedward added a comment - VPF module no longer supported

          People

          • Assignee:
            Jeff Yutzler
            Reporter:
            Chris Holmes
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: