Hi Andrea,
I had been using the "configure=none" procedure described in the training.
But you convinced me to take another look at the results I was getting.
It turns out the problem was caused by having an "IndexingDirectories"
parameter specified in the indexer XML. (The docs [1] imply this parameter
should be specified if the granules are not stored in the same location as
the configuration files.)
Removing the IndexingDirectories parameter resolved the issue; now only the
granule I submit in the POST request is harvested.
If this behavior with regard to IndexingDirectories is expected, I would be
happy to try and clarify the documentation.
Thanks,
Dan
[1]
http://docs.geoserver.org/stable/en/user/data/raster/imagemosaic/configuration.html
On Thu, Mar 22, 2018 at 1:01 PM, Andrea Aime <andrea.a...@geo-solutions.it>
wrote:
> On Thu, Mar 22, 2018 at 5:47 PM, Daniel Baston <dbas...@gmail.com> wrote:
>
>> Hi Andrea,
>>
>> After digging through this more, my understanding now is that all
>> granules are harvested because:
>>
>> 1) The CoverageStore post handler instantiates an ImageMosaicReader [1]
>> 2) An ImageMosaicReader automatically harvests granules when it is
>> created. Example test showing this behavior in [2]
>>
>> Only after the ImageMosaicReader is instantiated (and all granules
>> harvested) is the harvest method explicitly called with the filename I
>> provide as data in the POST call.
>>
>> For my use case, I have successfully applied the following workaround:
>>
>> 1) Use the Indexer wildcard to identify a single granule on disk
>> 2) Update the Indexer XML file, replacing the wildcard with the granule
>> file name
>> 3) Create the ImageMosaic and associated coverages
>> 4) Revert the wildcard in the Indexer XML file to its original value, and
>> make a PUT call to update the ImageMosaic
>> 5) At some later time, harvest granules by with a POST request like in my
>> original email
>>
>> It seems like this is the best solution I have for now. But to avoid
>> this, maybe it would be reasonable to have some mechanism for constructing
>> an ImageMosaicReader without triggering a harvest?
>>
>
> The harvest happens only if the mosaic is completely empty, and instructed
> to scan a certain directory, that's the normal behavior.
> But you can create an empty mosaic and harvest into it the first granule
> later, see here:
>
> https://geoserver.geo-solutions.it/edu/en/multidim/
> rest/index.html#configuring-an-empty-mosaic
>
> The example used to live in the GeoServer documentation too, but when the
> REST API switch happened it got wiped away
> in the documentation restructure. You can still find it here:
> http://docs.geoserver.org/2.10.x/en/user/rest/examples/
> curl.html#creating-an-empty-mosaic-and-harvest-granules
>
> Hope this helps.
>
> 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
> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
> 55054 Massarosa
> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
> (LU)
> phone: +39 0584 962313 <+39%200584%20962313>
> fax: +39 0584 1660272 <+39%200584%20166%200272>
> mob: +39 339 8844549 <+39%20339%20884%204549>
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> darcene notizia via e-mail e di procedere alla distruzione del messaggio
> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
> principi dettati dal D.Lgs. 196/2003.
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named
> addressee(s). If you are not the intended recipient, please contact
> immediately the sender by telephone, fax or e-mail and delete the
> information in this message that has been received in error. The sender
> does not give any warranty or accept liability as the content, accuracy or
> completeness of sent messages and accepts no responsibility for changes
> made after they were sent or for other risks which arise as a result of
> e-mail transmission, viruses, etc.
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users