GeoServer
  1. GeoServer
  2. GEOS-3399

WFS shapefile output generates different names at each call when a field exceeds 10 chars

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.6, 2.0-RC1
    • Fix Version/s: 1.7.7, 2.0-RC2
    • Component/s: WFS
    • Labels:
      None
    • Number of attachments :
      1

      Description

      This is due to the change in GEOS-3235, the map of already used field names must not be a field, wfs output formats are supposed to be stateless

        Issue Links

          Activity

          Hide
          Andrea Aime added a comment -

          Mauro, the plan of attack for this one is to turn the map into a variable and have it reset for each generated shapefile. Think of the multi shapefile output case, what fields are stored in one shapefile is of no concern for the next one.

          Show
          Andrea Aime added a comment - Mauro, the plan of attack for this one is to turn the map into a variable and have it reset for each generated shapefile. Think of the multi shapefile output case, what fields are stored in one shapefile is of no concern for the next one.
          Hide
          Andrea Aime added a comment -

          Also, we should keep the first truncated name as is (truncated, no postfix attached) and start adding numbers only when the subsequent duplicates (if any) are found.

          Show
          Andrea Aime added a comment - Also, we should keep the first truncated name as is (truncated, no postfix attached) and start adding numbers only when the subsequent duplicates (if any) are found.
          Hide
          Mauro Bartolomeoli added a comment -

          The included patch should solve the issue (please, give it a review). In short:

          • the map is no more a field, but it's created in the createAttributeMappings method for each different schema
          • for the postfix not to be attached to the first truncated field, it should already be done that way (maybe the previous issue was hiding it, due to the counters not resetting)
          Show
          Mauro Bartolomeoli added a comment - The included patch should solve the issue (please, give it a review). In short: the map is no more a field, but it's created in the createAttributeMappings method for each different schema for the postfix not to be attached to the first truncated field, it should already be done that way (maybe the previous issue was hiding it, due to the counters not resetting)
          Hide
          Andrea Aime added a comment -

          Ah, thank you. I'll merge it in the larger work I'm doing (solving another issue at the same time, GEOS-3381)

          Show
          Andrea Aime added a comment - Ah, thank you. I'll merge it in the larger work I'm doing (solving another issue at the same time, GEOS-3381 )
          Hide
          Andrea Aime added a comment -

          Hopefully fixed on 1.7.x and trunk.
          I gave the nightly build a kick so you can grab today's binary and it should contain the fix already, let me know if this works for you. Between this issue and the other one I had to rework the code more than I would have liked to.

          Show
          Andrea Aime added a comment - Hopefully fixed on 1.7.x and trunk. I gave the nightly build a kick so you can grab today's binary and it should contain the fix already, let me know if this works for you. Between this issue and the other one I had to rework the code more than I would have liked to.

            People

            • Assignee:
              Andrea Aime
              Reporter:
              Andrea Aime
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: