Re: [Geoserver-users] (no subject)

2019-12-04 Thread Daniele Romagnoli
Hi Natalia,
You may want to try with the "external" method in order to avoid a physical
copy (streaming data into GeoServer folders) of your NetCDF file which
might be big in favor of having that file being accessed as a simple
external reference.

Try with something like below.
Just make sure you don't have previously partially configured
coveragestores with same name or files copied around on your geoserver data
dir.
If so, please remove that coverage store and also consider cleaning up any
auxiliary file associated with your NetCDF if present. if you didn't define
any NETCDF_DATA_DIR, you should see a .my_file_hash hidden folder beside
your netcdf file if you already successfully did some previous
configuration. (something
like .my_file_3eb615ab61e5f2bfac642bffc5b95003e86bc5ff)

This is the REST command you can use:
curl -u admin:geoserver -v -X PUT "
http://localhost:8080/geoserver/rest/workspaces/WP1/coveragestores/CV2/external.netcdf;
-H "Content-type: text/plain" -d "file:///home/local/my_file.nc"

If everything goes well, you will see an output like this:
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8080 (#0)
* Server auth using Basic with user 'support'
> PUT /geoserver/rest/workspaces/WP1/coveragestores/CV2/external.netcdf
HTTP/1.1
> Host: localhost:8080
> Authorization: Basic c3VwcG9ydDpkI09SOEBxMU84RTY=
> User-Agent: curl/7.47.0
> Accept: */*
> Content-type: text/plain
> Content-Length: 56
>
* upload completely sent off: 56 out of 56 bytes
< HTTP/1.1 201 Created
< Content-Disposition: inline;filename=f.txt
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Server: Jetty(9.4.12.v20180830)
<

  CV2
  NetCDF
  true
  
WP1
  
  <__default>false
  file:/home/local/my_file.nc
* Connection #0 to host localhost left intact

Please, let us know.
Cheers,
Daniele

On Tue, Dec 3, 2019 at 2:24 PM Natalia Moraga  wrote:

> hello all,
> I'm trying to upload a netcdf file to geoserver, without success.
> I did the following steps:
> - create the workspace without problem
> - then the PUT request for the file, following the doc
> https://docs.geoserver.org/latest/en/api/#/latest/en/api/1.0.0/coveragestores.yaml
> :
> curl -u admin:geoserver -v -X PUT "
> http://localhost/geoserver/rest/workspaces/WP1/coveragestores/CV1/file.netcdf?filename=%2Fhome%2Flocal%2Ftest1.zip;
> -H  "accept: application/json" -H  "content-type: application/json"
> the file test1.zip, located in /home/local is a zipped netcdf file (zip
> test1.zip myfile.nc) and is readable by all.
> The answer is 500
>
> The logs file contains:
> [org.geoserver.rest.RestException 500 INTERNAL_SERVER_ERROR: Could not
> acquire reader for coverage.]
> 2019-12-03 15:38:02,322 INFO [rest.catalog] - Using existing coverage
> store: CV1
> 2019-12-03 15:38:02,324 WARN [io.netcdf] - unable to connect to the
> specified source
> file:/opt/tomcat/webapps/geoserver/data/data/WP1/CV1/var/tmp/testnm.zip
> org.geotools.data.DataSourceException: unable to connect to the specified
> source
> file:/opt/tomcat/webapps/geoserver/data/data/WP1/CV1/var/tmp/testnm.zip
>
> the file in tomcat dir is empty:
> -rw-r- 1 tomcat8 tomcat8 0 Dec  3 15:38
> /opt/tomcat/webapps/geoserver/data/data/WP1/CV1/var/tmp/testnm.zip
>
> I am also able to to the same process using the webgui and it works well.
> Only the REST API is a problem.
>
> Anybody can help?
> Thanks in advance
>
> Natalia
>
>
> --
> Natalia Moraga
> Géographe / 07 66 23 87 33
> ___
> 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
>


-- 
Regards,
Daniele Romagnoli
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Daniele Romagnoli
Senior Software Engineer

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

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, 

Re: [Geoserver-users] Duplicate element values in app-schema

2019-12-04 Thread lge.geo
Hi, many thanks for answer. I have checked links you included, but i am
afraid It does not help with my problem. I am able to join the nested table,
but the duplicated values are not show. For example, in the output is just
one element: service name 2while I am expecting:service name 2service name
2service name 2I suppose that it is caused by the same element value
(service name 2), even if element attributes are different (cz, en,
de).Thanks for any idea how to solve it.Lange



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html___
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