On Fri, Aug 10, 2018 at 6:37 PM Jody Garnett <jody.garn...@gmail.com> wrote:

> Good find Andrea:
>
> Can you report a GeoServer bug for the featuretype.xml issue and we can
> sort out an approach. As with the GEOT-6087
> <https://osgeo-org.atlassian.net/browse/GEOT-6087> I would prefer to
> store the geometry type, rather than the class name if we are making a
> change.
>

Those are bindings, class objects, when loaded into memory, I'm guess that
XStream can be configured with a custom converter that supports the old
class names. Unsure about
making them "geometry types" here however, see how the entire config file
looks like:

<featureType>
  <id>FeatureTypeInfoImpl-f95e248:1639c9ede3c:-7f46</id>
  <name>tasmania_cities</name>
  <nativeName>tasmania_cities</nativeName>
  <namespace>
    <id>NamespaceInfoImpl-16665e65:14fac043b7f:-8000</id>
  </namespace>
  <title>tasmania_cities</title>
  <keywords>
    <string>tasmania_cities</string>
    <string>features</string>
  </keywords>
  <nativeCRS>GEOGCS[&quot;WGS 84&quot;,
  DATUM[&quot;World Geodetic System 1984&quot;,
    SPHEROID[&quot;WGS 84&quot;, 6378137.0, 298.257223563,
AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],
    AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],
  PRIMEM[&quot;Greenwich&quot;, 0.0,
AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],
  UNIT[&quot;degree&quot;, 0.017453292519943295],
  AXIS[&quot;Geodetic longitude&quot;, EAST],
  AXIS[&quot;Geodetic latitude&quot;, NORTH],
  AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]]</nativeCRS>
  <srs>EPSG:4326</srs>
  <nativeBoundingBox>
    <minx>147.2909004483</minx>
    <maxx>147.2911004483</maxx>
    <miny>-42.85110181689001</miny>
    <maxy>-42.85090181689</maxy>
    <crs>EPSG:4326</crs>
  </nativeBoundingBox>
  <latLonBoundingBox>
    <minx>147.2909004483</minx>
    <maxx>147.2911004483</maxx>
    <miny>-42.85110181689001</miny>
    <maxy>-42.85090181689</maxy>
    <crs>EPSG:4326</crs>
  </latLonBoundingBox>
  <projectionPolicy>NONE</projectionPolicy>
  <enabled>true</enabled>
  <metadata>
    <entry key="recalculate-bounds">true</entry>
  </metadata>
  <store class="dataStore">
    <id>DataStoreInfoImpl-f95e248:1639c9ede3c:-7f47</id>
  </store>
  <maxFeatures>0</maxFeatures>
  <numDecimals>0</numDecimals>
  <attributes>
    <attribute>
      <name>the_geom</name>
      <minOccurs>0</minOccurs>
      <maxOccurs>0</maxOccurs>
      <nillable>false</nillable>
      <binding>*com.vividsolutions.jts.geom.MultiPoint*</binding>
    </attribute>
    <attribute>
      <name>CITY_NAME</name>
      <minOccurs>0</minOccurs>
      <maxOccurs>0</maxOccurs>
      <nillable>false</nillable>
      <binding>*java.lang.String*</binding>
    </attribute>
    <attribute>
      <name>ADMIN_NAME</name>
      <minOccurs>0</minOccurs>
      <maxOccurs>0</maxOccurs>
      <nillable>false</nillable>
      <binding>java.lang.String</binding>
    </attribute>
    <attribute>
      <name>CNTRY_NAME</name>
      <minOccurs>0</minOccurs>
      <maxOccurs>0</maxOccurs>
      <nillable>false</nillable>
      <binding>java.lang.String</binding>
    </attribute>
    <attribute>
      <name>STATUS</name>
      <minOccurs>0</minOccurs>
      <maxOccurs>0</maxOccurs>
      <nillable>false</nillable>
      <binding>java.lang.String</binding>
    </attribute>
    <attribute>
      <name>POP_CLASS</name>
      <minOccurs>0</minOccurs>
      <maxOccurs>0</maxOccurs>
      <nillable>false</nillable>
      <binding>java.lang.String</binding>
    </attribute>
  </attributes>
  <overridingServiceSRS>false</overridingServiceSRS>
  <skipNumberMatched>false</skipNumberMatched>
  <circularArcPresent>false</circularArcPresent>
</featureType>

Aside: This would fall under "data directory" migration, the logic of which
> I am not completely familiar with since it has been some time since we made
> any structural changes.
>

There is a old reader and a new reader, there is no real migration logic.
For this I'd roll a custom converter allowing backwards compatibility
instead.


> An easy approach would be to regenerate this cached feature type
> information, but we should also be able to update in place.
>

Nope, users get mad at us when we modify the data dir contents on startup
(we have had a number of tickets already),
data dirs should be usable on read-only sources too (with the attention of
moving out logs, temps, tiles)

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information. == Ing. Andrea Aime @geowolf Technical Lead
GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39
0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
http://www.geo-solutions.it http://twitter.com/geosolutions_it
------------------------------------------------------- *Con riferimento
alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
circostanza inerente alla presente email (il suo contenuto, gli eventuali
allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
sarei comunque grato se potesse darmene notizia. This email is intended
only for the person or entity to which it is addressed and may contain
information that is privileged, confidential or otherwise protected from
disclosure. We remind that - as provided by European Regulation 2016/679
“GDPR” - copying, dissemination or use of this e-mail or the information
herein by anyone other than the intended recipient is prohibited. If you
have received this email by mistake, please notify us immediately by
telephone or e-mail.*
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to