[Geoserver-users] Dynamic Styling three bands raster

2017-07-05 Thread Alberto CD
Hello,

I am trying to get a SLD style to render three bands raster using SLD
variable substitution (env)

At the moment I get it work with:

http://www.opengis.net/sld StyledLayerDescriptor.xsd" 
 xmlns="http://www.opengis.net/sld"; 
 xmlns:ogc="http://www.opengis.net/ogc"; 
 xmlns:xlink="http://www.w3.org/1999/xlink"; 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  
  
sentinel1


  sentinel1
  A sample style that draws a raster, good for displaying
imagery
  
  
  


  nolabel
  Opaque Raster
  A raster with 100% opacity
 
1.0

  
1
   

 
   
 algorithm
 StretchToMinimumMaximum
   
 
 
   
 low1
 0
   
 
 
   
 high1
 0.013
   
 


  
  
2


 
   
 algorithm
 StretchToMinimumMaximum
   
 
 
   
 low2
 0
   
 
 
   
 high2
 0.093
   
 


  
 
3
   

 
   
 algorithm
 StretchToMinimumMaximum
   
 
 
   
 low3
 10
   
 
 
   
 high3
 1600
   
 

 
  
   


  

  



The problem is that I have to specify three "low" and "high" env values
which is a bit of a hassle...

I want to normalize values of high1 and high2 based on high3 using something
similar as in SLD colormap ( ${env('high1', 'low1') /
env('high3', 1600)/1} )

Is tried this way but still have not it working:


http://www.opengis.net/sld StyledLayerDescriptor.xsd" 
 xmlns="http://www.opengis.net/sld"; 
 xmlns:ogc="http://www.opengis.net/ogc"; 
 xmlns:xlink="http://www.w3.org/1999/xlink"; 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  
  
sentinel1


  sentinel1
  A sample style that draws a raster, good for displaying
imagery
  
  
  


  nolabel
  Opaque Raster
  A raster with 100% opacity
 
1.0

  
1
   

 
   
 algorithm
 StretchToMinimumMaximum
   
 
 
   
 low1
 0
   
 
 
 
high1
 ${env('high1', 'low1') / env('high3',
1600)/1} 
   
 


  
  
2


 
   
 algorithm
 StretchToMinimumMaximum
   
 
 
   
 low2
 0
   
 
 
   
   high2 
 ${env('high2', 'low2') / env('high3',
1600)/1}
   
 


  
 
3
   

 
   
 algorithm
 StretchToMinimumMaximum
   
 
 
   
 low3
 10
   
 
 
   
 high3
 1600
   
 

 
  
   


  

  



Many thanks!

Alberto





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Dynamic-Styling-three-bands-raster-tp5326744.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

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

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] rest/seed/workspace:layername Problem communicating with GeoServer

2017-05-25 Thread Alberto CD
Hi list,

I am spent a couple of days try to find a solution for this so If only I
could find help here that would be great.

Problem specification:

I am using GeoServer rest to truncate and seed layers after upload process
(done using the rest too).

Weird thing is /rest/truncate/masstruncate works fine but
rest/seed/workspace:layer.xml does not.

I am a bit lost about rest security and at the moment I have kept the
rest.properties file using default configuration. 
/**;GET=ADMIN
/**;POST,DELETE,PUT=ADMIN

Using the curl command like so:
curl -v -u admin:passwd -XPOST -H "Content-type: text/xml" -d
"tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test3857020image/png8seed02"
"http://IP:8080/geoserver/gwc/rest/seed/tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test.xml";

I get this *200 response*:
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying IP...
* TCP_NODELAY set
* Connected to IP (IP) port 8080 (#0)
* Server auth using Basic with user 'admin'
> POST
> /geoserver/gwc/rest/seed/tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test.xml
> HTTP/1.1
> Host: IP:8080
> Authorization: Basic DEyMzQ=
> User-Agent: curl/7.51.0
> Accept: */*
> Content-type: text/xml
> Content-Length: 261
>
* upload completely sent off: 261 out of 261 bytes
< HTTP/1.1 200 OK
< Date: Thu, 25 May 2017 10:03:29 GMT
< Server: Noelios-Restlet-Engine/1.0..8
< Transfer-Encoding: chunked
<
* Curl_http_done: called premature == 0
* Connection #0 to host IP left intact


When I check the *log in debug mode* I see:

2017-05-25 11:03:29,804 ERROR [org.geoserver.ows] - 
org.geoserver.platform.ServiceException: Could not find layer
tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test
at
org.geoserver.wms.map.GetMapKvpRequestReader.parseLayers(GetMapKvpRequestReader.java:1325)
at
org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:231)
at
org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:84)
at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1489)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:677)
at 
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:265)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.geoserver.gwc.GWC.dispatchOwsRequest(GWC.java:1207)
at
org.geoserver.gwc.layer.GeoServerTileLayer.dispatchGetMap(GeoServerTileLayer.java:618)
at
org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:563)
at
org.geoserver.gwc.layer.GeoServerTileLayer.seedTile(GeoServerTileLayer.java:757)
at org.geowebcache.seed.SeedTask.doActionInternal(SeedTask.java:136)
at org.geowebcache.seed.GWCTask.doAction(GWCTask.java:76)
at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:36)
at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:25)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2017-05-25 11:03:29,797 DEBUG [org.geotools.util] -
InterpolationConverterFactory can be applied from Strings to Interpolation 
only.
2017-05-25 11:03:29,806 DEBUG [org.geotools.util] - CRSConverterFactory can
be applied from Strings to CRS  only.
2017-05-25 11:03:29,806 DEBUG [org.geotools.util] -
InterpolationConverterFactory can be applied from Strings to Interpolation 
only.
2017-05-25 11:03:29,806 DEBUG [org.geotools.util] - CRSConverterFactory can
be applied from Strings to CRS  only.
2017-05-25 11:03:29,806 ERROR [org.geoserver.ows] - 
org.geoserver.platform.ServiceException: Could not find layer
tests:field_id_test_uavngb_products-uavngb_20150130_120502_GNDVI_test
at
org.geoserver.wms.map.GetMapKvpRequestReader.parseLayers(GetMapKvpRequestReader.java:1325)
at
org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:231)
at
org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:84)
at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1489)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:677)
at 
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:265)
at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.geoserver.gwc.GWC.dispatchOwsRequest(GWC.java:1207)
at
org.geoserver.gwc.layer.GeoServerTileLayer.dispatchGetMap(GeoServerTileLayer.java:618)
at
org.geoserver.gwc.layer.GeoServerTileLayer.getMetatilingReponse(GeoServerTileLayer.java:563)
at
org.geoserver.gwc.layer.GeoServerTileLayer.seedTile(GeoServerTileLayer.

Re: [Geoserver-users] GeoWebCache delete all tiles after 5 minutes

2017-02-22 Thread Alberto CD
In the end it turned out that the GeoWebCache data directory was located
outside application data structure.
I moved it to there and now the tiles are permanently located in disk.

Cheers,

Alberto



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/GeoWebCache-delete-all-tiles-after-5-minutes-tp5308887p5308996.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

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


[Geoserver-users] GeoWebCache delete all tiles after 5 minutes

2017-02-21 Thread Alberto CD
Hi list,

I am having a problem with GeoWebCache. My GeoServer version is 2.8.2 and
GeoWebCache is 1.8.2.
The problem is that geowebcache.xml file is not generated in GeoWebCache
data directory, I just find gwc-gs.xml in geoserver_data_dir.
Direct WMS integration is enabled.

The requests are made using EPSG:3857 and in png8 format. Tiles are
generated fine but after around 5 minutes all the tiles are gone...(just the
tiles, not the folders). I have not enabled any InnerCache tiling neither
disk quota in the web interface.

Few moths ago the GeoServer version was upgraded from 2.7.7 to 2.8.2.
GeoWebCache is working fine in 2.7.7 in other machine.

I have been looking into documentation to find why geowebcache.xml is not in
geowebcache_dir but with any luck.

This is how it looks my GeoServerGWCConfig:


  1.0.0
  true
  false
  false
  false
  false
  false
  true
  class
org.geowebcache.storage.blobstore.memory.guava.GuavaCacheProvider
  

  class
org.geowebcache.storage.blobstore.memory.guava.GuavaCacheProvider
  
16
NULL
4
120
  

  
  true
  true
  4
  4
  0
  
EPSG:4326
EPSG:900913
  
  
image/png
image/jpeg
image/png8
  
  
image/png
image/jpeg
image/png8
  
  
image/png
image/jpeg
image/png8
  




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/GeoWebCache-delete-all-tiles-after-5-minutes-tp5308887.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

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


Re: [Geoserver-users] Workspace naming convention disable WFS getCapabilities

2016-12-08 Thread Alberto CD
Hi Andrea,

As usual thanks for sharing your expertise in this matter. We were really
confused here about what we were dealing with so thanks again.

With the information and link provided we will allocate and solve the
problem.

You are right, REST API is a great tool for automation but very prone to
errors (without warnings) but very powerful if knowingly used.

Cheers,

Alberto





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Workspace-naming-convention-disable-WFS-getCapabilities-tp5299017p5299208.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] Workspace naming convention disable WFS getCapabilities

2016-12-07 Thread Alberto CD
Hi list,

I have discovered that WFS GetCapabilities request is failing in
GeoServer...
After investigating it seems that our workspace naming convention might be
responsible for this, let me explain it.

After discovering this issue I read in the list that a misconfigured layer
can cause this problems and going to Settings, Global and selecting the
option below it will allow WFS capabilities document to be shown and the
misconfigured layer/s will appear in the log:
 

Applying this I went to the log and surprisingly the size was increasing
very quickly, looking at it most of the layers were being display on the log
along with the error...

2016-12-06 15:18:20,176 WARN [wms.capabilities] - Error writing metadata;
skipping layer: rapideye_20151022_120426_NDVI
java.lang.RuntimeException: Error while committing XML elements; specific
element was: Start(Layer, org.xml.sax.helpers.AttributesImpl@7682e3c6)
at
org.geotools.xml.transform.TransformerBase$TranslatorSupport.commit(TransformerBase.java:733)
at
org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleLayerTree(GetCapabilitiesTransformer.java:827)
at
org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleLayers(GetCapabilitiesTransformer.java:714)
at
org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleCapability(GetCapabilitiesTransformer.java:462)
at
org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.encode(GetCapabilitiesTransformer.java:299)
at
org.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:1026)


..

So I went to workspaces edit but did NOT edit anything just clicked "Save"
and got this error:
 

So to me it looks workspace naming has to start with a letter...???

All the workspaces and layers were ingested to GeoServer using rest, hence
no warnings about this before.

Another question is: Why is just failing WFS getCapabilities request?? WMS
and WCS are working fine (even though we have this warnigns in the log for
those too...)

Any help would be really appreciate it.

Thanks,

Alberto




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Workspace-naming-convention-disable-WFS-getCapabilities-tp5299017.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] OL layer preview error for shapefile

2016-11-14 Thread Alberto CD
Hi list,

I will explain the process I followed to be clear what I did and did not:
I am uploading a shapefile in .zip format to GeoServer. This shapefile is a
point geometry file with EPSG:3857.
For the process I am using curl command like this:
curl -v -s -S -u admin:pwd -XPUT -H "Content-type: application/zip"
--data-binary @"c:\data.zip"
http://ip:8080/geoserver/rest/workspaces/field_id_test_sample_processor/datastores/job_id_sample_processor_source/file.shp?
Everything go smoothly (any warn from GeoServer) but when I go to the layer
preview and click on the new generated layer I get this:

 
 
In the browser is displayed:
http://ip:8080/geoserver/web/null&format=application/openlayers

Then, checking the log I found:
2016-11-14 16:57:45,907 INFO [web.demo] - Could not set figure out
automatically a good preview link for
field_id_test_sample_processor:job_id_sample_processor_source
java.lang.NullPointerException
at
org.geoserver.wms.DefaultWebMapService.guessCommonSRS(DefaultWebMapService.java:671)
at
org.geoserver.wms.DefaultWebMapService.autoSetBoundsAndSize(DefaultWebMapService.java:505)
at org.geoserver.web.demo.PreviewLayer.getRequest(PreviewLayer.java:153)
at org.geoserver.web.demo.PreviewLayer.getWmsLink(PreviewLayer.java:201)
at
org.geoserver.web.demo.MapPreviewPage$1.getComponentForProperty(MapPreviewPage.java:85)
at
org.geoserver.web.wicket.GeoServerTablePanel$4.populateItem(GeoServerTablePanel.java:211)
at
org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:562)

I have tried:
Go to server: status/reload.
Restart GeoServer.
Add WKT EPSG:3857 code to epsgproperties file.

Is something that just happen when the shapefile is in EPSG:3857. Everything
works when uploading the very same shapefile in EPSG:4326 (this one is not
in GeoServer anymore).






--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/OL-layer-preview-error-for-shapefile-tp5295711.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

--
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users