[Geoserver-users] Display a single JPEG + worldfile from a directory of many

Use case: I've got a directory which contains thousands of JPG images and
accompanying JGW world files (they are scanned images where users have
red-lined areas of interest). Further images will be added to the directory
over time. In my OpenLayers 4.x web application, the user will be presented
with a list of relevant images. The user will choose which image to display
on the map. The JPG should show on the map, only ever showing one JPG at a
time.

In GeoServer 2.13.1 I can display JPG+JGW files by creating a WorldImage
datasource. This works fine for individual images, but I have to create a
data source for each.
I would like to configure GeoServer to have a single datasource which points
to the directory containing the JPG images. Then from OpenLayers, I'd like
to be able to request the display of any single JPG image in that directory
- showing just one JPG at a time.

Is this possible? Should I use Image Mosaic for this? I have read Image
Mosaic and I don't see a way of requesting the display of just one
image/granule from the mosaic.

Thanks,
John

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

Dear John,
a few things:

-1- I would go from JPEG + world file to GeoTiff JPEG compressed with
overviews (see
https://geoserver.geo-solutions.it/edu/en/raster_data/advanced_gdal/example4.html#example-n-4-serving-a-large-number-of-satellite-aerial-rgb-geotiff-with-compression)
-2- You shall use ImageMosaic with either a custom dimension or a
cql_filter support which is dynamic (you can add it to WMS queries)
and act on the underlying index attributes. You can easily collect
attributes from the filenames and turn them into attributes into the
underlying index ( see
https://geoserver.geo-solutions.it/edu/en/multidim/imagemosaic/mosaic_indexer.html#imagemosaic-file-indexing-options).
As an instance you could use the file name and put that in an
attribute in the index which can be queried directly or turned into a
custom dimension.
-3- I would put the index in DBMS rather than using a shapefile (this
is an optional step though, see
https://geoserver.geo-solutions.it/edu/en/multidim/imagemosaic/mosaic_datastore.html)

This should be enough to get you started I believe.

Regards,
Simone Giannecchini

GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

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.
On Mon, Jun 25, 2018 at 12:22 AM johnnyotoole <johnnyotoole@anonymised.com> wrote:

Use case: I've got a directory which contains thousands of JPG images and
accompanying JGW world files (they are scanned images where users have
red-lined areas of interest). Further images will be added to the directory
over time. In my OpenLayers 4.x web application, the user will be presented
with a list of relevant images. The user will choose which image to display
on the map. The JPG should show on the map, only ever showing one JPG at a
time.

In GeoServer 2.13.1 I can display JPG+JGW files by creating a WorldImage
datasource. This works fine for individual images, but I have to create a
data source for each.
I would like to configure GeoServer to have a single datasource which points
to the directory containing the JPG images. Then from OpenLayers, I'd like
to be able to request the display of any single JPG image in that directory
- showing just one JPG at a time.

Is this possible? Should I use Image Mosaic for this? I have read Image
Mosaic and I don't see a way of requesting the display of just one
image/granule from the mosaic.

Thanks,
John

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

------------------------------------------------------------------------------
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

Hi,
in addition to what Simone said, you also need to add georeferencing to your images, unfortunately
the mosaic creation will fail work with non georeferenced images (thought there was a ticket for this already,
but I cannot find it now).

Cheers
Andrea

···

On Mon, Jun 25, 2018 at 10:38 AM, Simone Giannecchini <simone.giannecchini@anonymised.com> wrote:

Dear John,
a few things:

-1- I would go from JPEG + world file to GeoTiff JPEG compressed with
overviews (see
https://geoserver.geo-solutions.it/edu/en/raster_data/advanced_gdal/example4.html#example-n-4-serving-a-large-number-of-satellite-aerial-rgb-geotiff-with-compression)
-2- You shall use ImageMosaic with either a custom dimension or a
cql_filter support which is dynamic (you can add it to WMS queries)
and act on the underlying index attributes. You can easily collect
attributes from the filenames and turn them into attributes into the
underlying index ( see
https://geoserver.geo-solutions.it/edu/en/multidim/imagemosaic/mosaic_indexer.html#imagemosaic-file-indexing-options).
As an instance you could use the file name and put that in an
attribute in the index which can be queried directly or turned into a
custom dimension.
-3- I would put the index in DBMS rather than using a shapefile (this
is an optional step though, see
https://geoserver.geo-solutions.it/edu/en/multidim/imagemosaic/mosaic_datastore.html)

This should be enough to get you started I believe.

Regards,
Simone Giannecchini

GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

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.

On Mon, Jun 25, 2018 at 12:22 AM johnnyotoole <johnnyotoole@anonymised.com…> wrote:

Use case: I’ve got a directory which contains thousands of JPG images and
accompanying JGW world files (they are scanned images where users have
red-lined areas of interest). Further images will be added to the directory
over time. In my OpenLayers 4.x web application, the user will be presented
with a list of relevant images. The user will choose which image to display
on the map. The JPG should show on the map, only ever showing one JPG at a
time.

In GeoServer 2.13.1 I can display JPG+JGW files by creating a WorldImage
datasource. This works fine for individual images, but I have to create a
data source for each.
I would like to configure GeoServer to have a single datasource which points
to the directory containing the JPG images. Then from OpenLayers, I’d like
to be able to request the display of any single JPG image in that directory

  • showing just one JPG at a time.

Is this possible? Should I use Image Mosaic for this? I have read Image
Mosaic and I don’t see a way of requesting the display of just one
image/granule from the mosaic.

Thanks,
John


Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


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:

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@anonymised.comsourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


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:

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@anonymised.com.382…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Regards, Andrea Aime == 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.

Ah, I don’t really mean that you need to georeference the images, just that you need to add a fake CRS to them,
like a UTM zone for example

Cheers
Andrea

···

On Mon, Jun 25, 2018 at 10:50 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
in addition to what Simone said, you also need to add georeferencing to your images, unfortunately
the mosaic creation will fail work with non georeferenced images (thought there was a ticket for this already,
but I cannot find it now).

Cheers
Andrea

On Mon, Jun 25, 2018 at 10:38 AM, Simone Giannecchini <simone.giannecchini@anonymised.comsolutions.it> wrote:

Dear John,
a few things:

-1- I would go from JPEG + world file to GeoTiff JPEG compressed with
overviews (see
https://geoserver.geo-solutions.it/edu/en/raster_data/advanced_gdal/example4.html#example-n-4-serving-a-large-number-of-satellite-aerial-rgb-geotiff-with-compression)
-2- You shall use ImageMosaic with either a custom dimension or a
cql_filter support which is dynamic (you can add it to WMS queries)
and act on the underlying index attributes. You can easily collect
attributes from the filenames and turn them into attributes into the
underlying index ( see
https://geoserver.geo-solutions.it/edu/en/multidim/imagemosaic/mosaic_indexer.html#imagemosaic-file-indexing-options).
As an instance you could use the file name and put that in an
attribute in the index which can be queried directly or turned into a
custom dimension.
-3- I would put the index in DBMS rather than using a shapefile (this
is an optional step though, see
https://geoserver.geo-solutions.it/edu/en/multidim/imagemosaic/mosaic_datastore.html)

This should be enough to get you started I believe.

Regards,
Simone Giannecchini

GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

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.

On Mon, Jun 25, 2018 at 12:22 AM johnnyotoole <johnnyotoole@anonymised.com> wrote:

Use case: I’ve got a directory which contains thousands of JPG images and
accompanying JGW world files (they are scanned images where users have
red-lined areas of interest). Further images will be added to the directory
over time. In my OpenLayers 4.x web application, the user will be presented
with a list of relevant images. The user will choose which image to display
on the map. The JPG should show on the map, only ever showing one JPG at a
time.

In GeoServer 2.13.1 I can display JPG+JGW files by creating a WorldImage
datasource. This works fine for individual images, but I have to create a
data source for each.
I would like to configure GeoServer to have a single datasource which points
to the directory containing the JPG images. Then from OpenLayers, I’d like
to be able to request the display of any single JPG image in that directory

  • showing just one JPG at a time.

Is this possible? Should I use Image Mosaic for this? I have read Image
Mosaic and I don’t see a way of requesting the display of just one
image/granule from the mosaic.

Thanks,
John


Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


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:

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@anonymised.comrge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


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:

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@anonymised.comrge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Regards, Andrea Aime == 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.

Regards, Andrea Aime == 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.

On Mon, 25 Jun 2018 at 09:52, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
in addition to what Simone said, you also need to add georeferencing to your images, unfortunately
the mosaic creation will fail work with non georeferenced images (thought there was a ticket for this already,
but I cannot find it now).

Possibly this one - https://osgeo-org.atlassian.net/browse/GEOS-8311

The work round is to add a .prj file to each file (see https://blog.ianturton.com/geotools,/projections,/itches/2017/10/20/adding-prj.html for a script).

Ian

Hi Ian,
yes, that’s the issue, personally I would go for a different approach solution wise.
The non georefenced images already get our “EPSG:404000” vendor code, that the mosaic
tries to save in its own prj file, and then blows up trying to read it back … imho we should just
make sure that was is written can be read back as EPSG:404000 again

Cheers
Andrea

···

On Mon, Jun 25, 2018 at 11:10 AM, Ian Turton <ijturton@anonymised.com> wrote:

On Mon, 25 Jun 2018 at 09:52, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
in addition to what Simone said, you also need to add georeferencing to your images, unfortunately
the mosaic creation will fail work with non georeferenced images (thought there was a ticket for this already,
but I cannot find it now).

Possibly this one - https://osgeo-org.atlassian.net/browse/GEOS-8311

The work round is to add a .prj file to each file (see https://blog.ianturton.com/geotools,/projections,/itches/2017/10/20/adding-prj.html for a script).

Ian

Regards, Andrea Aime == 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.

Thanks for all the information, I've lots to go on now.

Another option we'll consider is to let OpenLayers pull the JPEG file in
directly, without going through GeoServer. This should work with
ol.source.ImageStatic:
https://openlayers.org/en/latest/apidoc/ol.source.ImageStatic.html
The application will only be used on an internal network, so the issue of
downloading a ~1mb JPEG image to the browser isn't as big a concern as if
it was a public facing application.

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html