[Gfoss] OpenLayers con TileCache

Beh,
potrebbe essere perche' MapServer non conosce epsg:26592 e quindi non
agisce di conseguenza ?

( http://www.faunalia.com/pipermail/gfoss/2007-November/006611.html )

ps: attenzione che tilecache serve per cachare immagini a tiles e non
dati vettoriali.

Ciao,
A.

sei stato molto chiaro..ma penso posso semprein TileCache cambiare l'SRS.
Giusto?
Bene..se lo cambio in 26592:
[areesensibili]
type=WMSLayer
url=http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap-puglia/htdocs/gmap75.map&transparent=true
extension=png
srs=EPSG:26592

non cambia niente.Sembra non leggerlo!

Possibile che cachando i dati..non riesco a "spostare" i miei layer rispetto
a quello base?!!

Grazie,
Francesco

--
~~~~~~~~~~~~~~~~~
§ Andrea §
§ Peri §
~~~~~~~~~~~~~~~~~

l'epgs 26592 l'ho definito nel file di configurazione epgs. Quindi Mapserver
dovrebbe leggerlo!(infatti senza tileCache funziona).

E' però una sfortuna non poter utilizzare la cache solo perchè non funziona
correttamente la lettura dell'SRS. A me sembra un pò strano. Anche perchè
nel file TileCache.cfg esiste la possibilità del settaggio srs.
Magariprovo ad usare TileCache2.04, visto che uso la 2.01!

Speriamo bene.

Andrea Peri wrote:

Beh,
potrebbe essere perche' MapServer non conosce epsg:26592 e quindi non
agisce di conseguenza ?

( http://www.faunalia.com/pipermail/gfoss/2007-November/006611.html )

ps: attenzione che tilecache serve per cachare immagini a tiles e non
dati vettoriali.

Ciao,
A.

sei stato molto chiaro..ma penso posso semprein TileCache cambiare l'SRS.
Giusto?
Bene..se lo cambio in 26592:
[areesensibili]
type=WMSLayer
url=http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap-puglia/htdocs/gmap75.map&transparent=true
extension=png
srs=EPSG:26592

non cambia niente.Sembra non leggerlo!

Possibile che cachando i dati..non riesco a "spostare" i miei layer

rispetto

a quello base?!!

Grazie,
Francesco

--
~~~~~~~~~~~~~~~~~
§ Andrea §
§ Peri §
~~~~~~~~~~~~~~~~~
_______________________________________________
Iscriviti all'associazione GFOSS.it: http://www.gfoss.it/drupal/iscrizione
Gfoss@faunalia.com
http://www.faunalia.com/cgi-bin/mailman/listinfo/gfoss
Questa e' una lista di discussione pubblica aperta a tutti.
I messaggi di questa lista non rispecchiano necessariamente
le posizioni dell'Associazione GFOSS.it.

--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19267371.html
Sent from the Gfoss mailing list archive at Nabble.com.

francesco334 wrote:

l'epgs 26592 l'ho definito nel file di configurazione epgs. Quindi
Mapserver dovrebbe leggerlo!(infatti senza tileCache funziona).

E' però una sfortuna non poter utilizzare la cache solo perchè non
funziona correttamente la lettura dell'SRS. A me sembra un pò strano.
Anche perchè nel file TileCache.cfg esiste la possibilità del settaggio
srs.
Magariprovo ad usare TileCache2.04, visto che uso la 2.01!

Speriamo bene.

Prova a definire in Tilecache.cfg il 3004 anzichè il 26592...non si sa mai!

Il 26592 è stato deprecato nel 2003![1]

[1] - http://it.wikipedia.org/wiki/Gauss-Boaga#Codici_EPSG

CIAO

-----
Salvatore Larosa
GPG: 0xE504BBE2 (FP: D9B2 CA87 81CD 1B91 E24D 3B42 D0F7 FA01 E504 BBE2)
--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19267673.html
Sent from the Gfoss mailing list archive at Nabble.com.

Fatto,ecco l'errore :
An error occurred: Did not get image data back.
URL:
http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap-puglia/htdocs/gmap75.map&transparent=true&layers=areesensibili&styles=&service=WMS&width=256&format=image%2Fpng&request=GetMap&height=256&srs=EPSG%3A3004&version=1.1.1&bbox=16.5893554688%2C41.1767578125%2C16.611328125%2C41.1987304688
Content-Type Header: application/vnd.ogc.se_xml
Response:
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd&quot;&gt;
<ServiceExceptionReport version="1.1.1">
<ServiceException code="InvalidSRS">
msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be
valid for all requested layers.
</ServiceException>
</ServiceExceptionReport>

è strano perchè il 3004 (anche il 3003) c'èll'ho definito nelfile di congif
epgs di mapserver.
Perchè ho quest'errore?

Salvator*eL*arosa wrote:

francesco334 wrote:

l'epgs 26592 l'ho definito nel file di configurazione epgs. Quindi
Mapserver dovrebbe leggerlo!(infatti senza tileCache funziona).

E' però una sfortuna non poter utilizzare la cache solo perchè non
funziona correttamente la lettura dell'SRS. A me sembra un pò strano.
Anche perchè nel file TileCache.cfg esiste la possibilità del settaggio
srs.
Magariprovo ad usare TileCache2.04, visto che uso la 2.01!

Speriamo bene.

Prova a definire in Tilecache.cfg il 3004 anzichè il 26592...non si sa
mai!

Il 26592 è stato deprecato nel 2003![1]

[1] - http://it.wikipedia.org/wiki/Gauss-Boaga#Codici_EPSG

CIAO

--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19268293.html
Sent from the Gfoss mailing list archive at Nabble.com.

francesco334 wrote:

Fatto,ecco l'errore :
An error occurred: Did not get image data back.
URL:
http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap-puglia/htdocs/gmap75.map&transparent=true&layers=areesensibili&styles=&service=WMS&width=256&format=image%2Fpng&request=GetMap&height=256&srs=EPSG%3A3004&version=1.1.1&bbox=16.5893554688%2C41.1767578125%2C16.611328125%2C41.1987304688
Content-Type Header: application/vnd.ogc.se_xml
Response:
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd&quot;&gt;
<ServiceExceptionReport version="1.1.1">
<ServiceException code="InvalidSRS">
msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be
valid for all requested layers.
</ServiceException>
</ServiceExceptionReport>

è strano perchè il 3004 (anche il 3003) c'èll'ho definito nelfile di
congif epgs di mapserver.
Perchè ho quest'errore?

Puoi postare il tuo mapfile qui?
Secondo me il problema sta li!

CIao

-----
Salvatore Larosa
GPG: 0xE504BBE2 (FP: D9B2 CA87 81CD 1B91 E24D 3B42 D0F7 FA01 E504 BBE2)
--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19268486.html
Sent from the Gfoss mailing list archive at Nabble.com.

francesco334 wrote:

Fatto,ecco l'errore :
An error occurred: Did not get image data back.
URL:
http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap-puglia/htdocs/gmap75.map&transparent=true&layers=areesensibili&styles=&service=WMS&width=256&format=image%2Fpng&request=GetMap&height=256&srs=EPSG%3A3004&version=1.1.1&bbox=16.5893554688%2C41.1767578125%2C16.611328125%2C41.1987304688
Content-Type Header: application/vnd.ogc.se_xml
Response:
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd&quot;&gt;
<ServiceExceptionReport version="1.1.1">
<ServiceException code="InvalidSRS">
msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be
valid for all requested layers.
</ServiceException>
</ServiceExceptionReport>

è strano perchè il 3004 (anche il 3003) c'èll'ho definito nelfile di
congif epgs di mapserver.
Perchè ho quest'errore?

Prova a vedere che output ha questo:
http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap-puglia/htdocs/gmap75.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

-----
Salvatore Larosa
GPG: 0xE504BBE2 (FP: D9B2 CA87 81CD 1B91 E24D 3B42 D0F7 FA01 E504 BBE2)
--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19268522.html
Sent from the Gfoss mailing list archive at Nabble.com.

Mi fa scaricare questo file che ti hoinviato in allegato.
http://www.nabble.com/file/p19270308/mapserv.1%2526REQUEST%253DGetCapabilities
mapserv.1%26REQUEST%3DGetCapabilities

comunque:

impostando poi l'srs a 26592, (indicando nel file html reprojecct=true) mi
dice:
An error occurred: Current y value 41.185824 is too far from tile corner y
41.176758

Perchè questo errore?

Salvator*eL*arosa wrote:

francesco334 wrote:

Fatto,ecco l'errore :
An error occurred: Did not get image data back.
URL:
http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap-puglia/htdocs/gmap75.map&transparent=true&layers=areesensibili&styles=&service=WMS&width=256&format=image%2Fpng&request=GetMap&height=256&srs=EPSG%3A3004&version=1.1.1&bbox=16.5893554688%2C41.1767578125%2C16.611328125%2C41.1987304688
Content-Type Header: application/vnd.ogc.se_xml
Response:
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd&quot;&gt;
<ServiceExceptionReport version="1.1.1">
<ServiceException code="InvalidSRS">
msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must
be valid for all requested layers.
</ServiceException>
</ServiceExceptionReport>

è strano perchè il 3004 (anche il 3003) c'èll'ho definito nelfile di
congif epgs di mapserver.
Perchè ho quest'errore?

Prova a vedere che output ha questo:
http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap-puglia/htdocs/gmap75.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19270308.html
Sent from the Gfoss mailing list archive at Nabble.com.

Questo il file Map (in allegato)

Salvator*eL*arosa wrote:

francesco334 wrote:

Fatto,ecco l'errore :
An error occurred: Did not get image data back.
URL:
http://localhost:8081/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap-puglia/htdocs/gmap75.map&transparent=true&layers=areesensibili&styles=&service=WMS&width=256&format=image%2Fpng&request=GetMap&height=256&srs=EPSG%3A3004&version=1.1.1&bbox=16.5893554688%2C41.1767578125%2C16.611328125%2C41.1987304688
Content-Type Header: application/vnd.ogc.se_xml
Response:
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd&quot;&gt;
<ServiceExceptionReport version="1.1.1">
<ServiceException code="InvalidSRS">
msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must
be valid for all requested layers.
</ServiceException>
</ServiceExceptionReport>

è strano perchè il 3004 (anche il 3003) c'èll'ho definito nelfile di
congif epgs di mapserver.
Perchè ho quest'errore?

Puoi postare il tuo mapfile qui?
Secondo me il problema sta li!

CIao

http://www.nabble.com/file/p19270335/gmap75.map gmap75.map
--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19270335.html
Sent from the Gfoss mailing list archive at Nabble.com.

francesco334 wrote:

Questo il file Map (in allegato)

Ti rispondo velocemente, dopo aver dato un veloce lettura al
tuo mapfile, prova a sostituire il 26592 con il 3004! Ho visto
che tutti i layer hanno questo EPSG!

Continuo a leggere.....

-----
Salvatore Larosa
GPG: 0xE504BBE2 (FP: D9B2 CA87 81CD 1B91 E24D 3B42 D0F7 FA01 E504 BBE2)
--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19270467.html
Sent from the Gfoss mailing list archive at Nabble.com.

francesco334 wrote:

Questo il file Map (in allegato)

Aggiusta anche questa parte:

IMAGEPATH "/ms4w/apps/gmap-puglia/tmp/ms_tmp/"
IMAGEURL "../tmp/ms_tmp/"

con

IMAGEPATH "/ms4w/apps/gmap-puglia/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"

-----
Salvatore Larosa
GPG: 0xE504BBE2 (FP: D9B2 CA87 81CD 1B91 E24D 3B42 D0F7 FA01 E504 BBE2)
--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19270583.html
Sent from the Gfoss mailing list archive at Nabble.com.

Fatto tentativo IMAGEURL, ma non cambia niente (ero scettico su questo..non
penso centri qualkosa).
Fatto tentavivo col cambio in 3004 ma niente.

Cosa "penso" di aver capito:
1) se nellapagina html non inserisco 'reproject' : true, i layer non
verranno mai sovrapposti correttamente sui layer di Google.
2) settando i tilecache.cfg srs=EPSG:26592,non ho nessun errore, ma non vedo
il mio layer. Settando srs=4326 (o non settandolo, evidentemente è di
default) i layer vengono sovrapposti ma non correttamente rispetto ai limiti
della mia città (di Google Map).

Deduco quindi :
la strada giusta è settare EPGS:26592 con reproject=true. Se faccio così ho
l'errore :
"An error occurred: Current y value 41.185824 is too far from tile corner y
41.176758 "

Vedendo un pò su internet,mi dicono di settare correttamente il bbox!
Sinceramente non l'ho mai settato enonho capito come recuperarlo!

Help..please!

Grazie,
Francesco

Salvator*eL*arosa wrote:

francesco334 wrote:

Questo il file Map (in allegato)

Aggiusta anche questa parte:

IMAGEPATH "/ms4w/apps/gmap-puglia/tmp/ms_tmp/"
IMAGEURL "../tmp/ms_tmp/"

con

IMAGEPATH "/ms4w/apps/gmap-puglia/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"

--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19286140.html
Sent from the Gfoss mailing list archive at Nabble.com.

francesco334 wrote:

Vedendo un pò su internet,mi dicono di settare correttamente il bbox!
Sinceramente non l'ho mai settato enonho capito come recuperarlo!

Help..please!

Grazie,
Francesco

Per inserire il bounds procedi così:

Inserisci questa variabile nella funzione init();

var bounds = new OpenLayers.Bounds(Xmin,Ymin,Xmax,Ymax);

poi in mapOptions inserisci:

maxExtent=bounds

Per esempio nel mio caso:
           var bounds = new
OpenLayers.Bounds(2614649.5,4320194.5,2653614.5,4344669.5);
           var mapOptions = {
         theme: null,
      controls: ,
      maxExtent: bounds,
      projection:"EPSG:3004",
      resolutions: [1,2,4,8,16,32,64,128,256,512],
      maxResolution: 'auto',
      units: "m",
      format: 'png',
      numZoomLevel: 10 };

           map = new OpenLayers.Map( 'map' , mapOptions);

Ciao!

-----
Salvatore Larosa
GPG: 0xE504BBE2 (FP: D9B2 CA87 81CD 1B91 E24D 3B42 D0F7 FA01 E504 BBE2)
--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19286296.html
Sent from the Gfoss mailing list archive at Nabble.com.

Se non inserisconiente, iparametri di default qualisono? (intendo le var in
mapOptions )

Salvator*eL*arosa wrote:

francesco334 wrote:

Vedendo un pò su internet,mi dicono di settare correttamente il bbox!
Sinceramente non l'ho mai settato enonho capito come recuperarlo!

Help..please!

Grazie,
Francesco

Per inserire il bounds procedi così:

Inserisci questa variabile nella funzione init();

var bounds = new OpenLayers.Bounds(Xmin,Ymin,Xmax,Ymax);

poi in mapOptions inserisci:

maxExtent=bounds

Per esempio nel mio caso:
           var bounds = new
OpenLayers.Bounds(2614649.5,4320194.5,2653614.5,4344669.5);
           var mapOptions = {
         theme: null,
      controls: ,
      maxExtent: bounds,
      projection:"EPSG:3004",
      resolutions: [1,2,4,8,16,32,64,128,256,512],
      maxResolution: 'auto',
      units: "m",
      format: 'png',
      numZoomLevel: 10 };

           map = new OpenLayers.Map( 'map' , mapOptions);

Ciao!

--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19286337.html
Sent from the Gfoss mailing list archive at Nabble.com.

Se inserisco quei valori, vedo imieilayer disabilitati.Qual'è l'errore? Il
bbox?

francesco334 wrote:

Se non inserisconiente, iparametri di default qualisono? (intendo le var
in mapOptions )

Salvator*eL*arosa wrote:

francesco334 wrote:

Vedendo un pò su internet,mi dicono di settare correttamente il bbox!
Sinceramente non l'ho mai settato enonho capito come recuperarlo!

Help..please!

Grazie,
Francesco

Per inserire il bounds procedi così:

Inserisci questa variabile nella funzione init();

var bounds = new OpenLayers.Bounds(Xmin,Ymin,Xmax,Ymax);

poi in mapOptions inserisci:

maxExtent=bounds

Per esempio nel mio caso:
           var bounds = new
OpenLayers.Bounds(2614649.5,4320194.5,2653614.5,4344669.5);
           var mapOptions = {
         theme: null,
      controls: ,
      maxExtent: bounds,
      projection:"EPSG:3004",
      resolutions: [1,2,4,8,16,32,64,128,256,512],
      maxResolution: 'auto',
      units: "m",
      format: 'png',
      numZoomLevel: 10 };

           map = new OpenLayers.Map( 'map' , mapOptions);

Ciao!

--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19288917.html
Sent from the Gfoss mailing list archive at Nabble.com.

francesco334 wrote:

Se inserisco quei valori, vedo imieilayer disabilitati.Qual'è l'errore? Il
bbox?

In che senso? Vedi le pinkTile (quadranti di colore rosa cn una crocetta in
alto a sinistra!)?
Se è così prova a cliccarci col tasto dx dl mouse e selzione "Visualizza
Immagine"
ti dovrebbe far vedere l'errore relativo a TileCache!

Hai inserito il bbox uguale all'EXTENT del mapfile?

Prova a vedere anche se nei log (php,apache etc) c'è
qualcsa di anomalo!

CIAO

-----
Salvatore Larosa
GPG: 0xE504BBE2 (FP: D9B2 CA87 81CD 1B91 E24D 3B42 D0F7 FA01 E504 BBE2)
--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19306235.html
Sent from the Gfoss mailing list archive at Nabble.com.

No no..

non i quadranti di colore rosa...proprio i Layer (del gruppo OverLayer) di
colore grigio.
E..la pagina viene caricata immediatamente, visualizzandoilil baselayer di
google.

Praticamente non "legge"i miei layer.

Cmq...facendo vari tentativi ho notato un'altracosa:

Se ilmio layer, lo setto come BaseLayer, il projection si trova alla
perfezione con il projection di Google.
Se setto nel mio layer isBaseLayer=false, mi cambia il projection!

Stopensando "seriamente" di modificare ilcodice sulla lettura dei layer
(distinguendo i base dagli overlayer).
Se posso, voglio mettere anche i baseLayer come checkbox dando la
possibilitàdi sceglierne +di uno contemporaneamente!

Che ne dite?

Salvator*eL*arosa wrote:

francesco334 wrote:

Se inserisco quei valori, vedo imieilayer disabilitati.Qual'è l'errore?
Il bbox?

In che senso? Vedi le pinkTile (quadranti di colore rosa cn una crocetta
in alto a sinistra!)?
Se è così prova a cliccarci col tasto dx dl mouse e selzione "Visualizza
Immagine"
ti dovrebbe far vedere l'errore relativo a TileCache!

Hai inserito il bbox uguale all'EXTENT del mapfile?

Prova a vedere anche se nei log (php,apache etc) c'è
qualcsa di anomalo!

CIAO

--
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19307436.html
Sent from the Gfoss mailing list archive at Nabble.com.