Hi all,
I am in doubt about the shape file datastore.
I have created a datastore with a shape file.
example:
-
mylay.shp
-
mylay.shx
-
mylay.dbf
After the creation GS add two files:
-
mylay.fix
-
mylay.qix
The questions are:
What happen if I replace (everyday) the first tree files with some new generated?
Does the data store and the relative layers have to be reinitialized?
Best regards
Milan
–
Milan P. Antonovic
Software Engineer
Institute of Earth Sciences
University of Applied Sciences of the South Switzerland
SUPSI
Milan Antonovic ha scritto:
Hi all,
I am in doubt about the shape file datastore.
I have created a datastore with a shape file.
example:
* mylay.shp
* mylay.shx
* mylay.dbf
After the creation GS add two files:
* mylay.fix
* mylay.qix
The questions are:
What happen if I replace (everyday) the first tree files with some new generated?
Does the data store and the relative layers have to be reinitialized?
I don't think so, provided the attribute structure does not change
(if it does, yes, you have to rebuild the feature type in the config).
Mind the bbox in the capabilities won't be updated thought.
The .fix and .qix files are indexes. GeoServer should be smart enough
to recognize they are old compared to the shapefile and replace them
with newer versions, but I never tried what you're suggesting, so
have a look. If they are not replaced automatically at the next
request after the replacement, wipe out the old ones when you're
replacing the main three files (this should force their re-creation)
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
Your right Andrea!
I’ve made some tests and, the index files are recreated with newer versions.
Many thanks
Milan
2009/6/3 Andrea Aime <aaime@anonymised.com>
Milan Antonovic ha scritto:
Hi all,
I am in doubt about the shape file datastore.
I have created a datastore with a shape file.
example:
- mylay.shp
- mylay.shx
- mylay.dbf
After the creation GS add two files:
The questions are:
What happen if I replace (everyday) the first tree files with some new generated?
Does the data store and the relative layers have to be reinitialized?
I don’t think so, provided the attribute structure does not change
(if it does, yes, you have to rebuild the feature type in the config).
Mind the bbox in the capabilities won’t be updated thought.
The .fix and .qix files are indexes. GeoServer should be smart enough
to recognize they are old compared to the shapefile and replace them
with newer versions, but I never tried what you’re suggesting, so
have a look. If they are not replaced automatically at the next
request after the replacement, wipe out the old ones when you’re
replacing the main three files (this should force their re-creation)
Cheers
Andrea
–
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
I continued with some more testing… And now I’m quite sure that GS does not re-index the shape files during the map browsing…
When I re-submit the datastore with the “create spatial index” option setted to true the index is rebuild (sometimes).
If I delete the index files nothing happens also if I re-submit the datastore data, the files are not created.
The only way I found is to restart tomcat… Or maybe can i recreate the index with some ogr command?
Cheers
Milan
2009/6/3 Milan Antonovic <milan.antonovic@anonymised.com>
Your right Andrea!
I’ve made some tests and, the index files are recreated with newer versions.
Many thanks
Milan
2009/6/3 Andrea Aime <aaime@anonymised.com>
Milan Antonovic ha scritto:
Hi all,
I am in doubt about the shape file datastore.
I have created a datastore with a shape file.
example:
- mylay.shp
- mylay.shx
- mylay.dbf
After the creation GS add two files:
The questions are:
What happen if I replace (everyday) the first tree files with some new generated?
Does the data store and the relative layers have to be reinitialized?
I don’t think so, provided the attribute structure does not change
(if it does, yes, you have to rebuild the feature type in the config).
Mind the bbox in the capabilities won’t be updated thought.
The .fix and .qix files are indexes. GeoServer should be smart enough
to recognize they are old compared to the shapefile and replace them
with newer versions, but I never tried what you’re suggesting, so
have a look. If they are not replaced automatically at the next
request after the replacement, wipe out the old ones when you’re
replacing the main three files (this should force their re-creation)
Cheers
Andrea
–
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.