Re: [mapserver-users] Possible tile_map_edge_buffer issue

2011-08-02 Thread forums
bump

Has anyone else encountered this issue?

Thanks

On Thu, Jul 28, 2011 at 9:18 AM, Charlie Allgrove
 wrote:
> Hi
>
>
>
> I have an issue when using tile_map_edge_buffer functionality with mode=tile
> on a Google map view which displays the whole world at zoom 0,1 or 2. It
> probably manifests itself at higher zoom levels, but will be less obvious
> (if at all) since I'm only rendering data over land.
>
>
>
> In my map file I have (amongst others)
> WEB
>
>     METADATA
>
>     "tile_map_edge_buffer" "32" # 32 pixel rendering buffer
>
>     "http_max_age" "86400"
>
>     END
>
>   END
>
>
>
> My development code is not on a publicly available server at the moment, so
> I can't post a link but when I am looking at a Google map at zoom levels 0,1
> or 2, the tiles consistently cut off approx half-way across the USA (see
> attached screenshot).
>
> It seems that {tile=0 1 2} does not render with the buffering enabled, since
> the buffered area extends effectively to a negative tile reference {-1 1 2}
> which is illegal.
>
>
>
> Is there any way around this - is it possible only to enable the buffer for
> zooms >=3?
>
>
>
> Cheers
>
>
>
> Charlie
>
>
>
> --
>
> Charlie Allgrove
>
> Senior Developer
>
>
>
> Connection Services :: Business Mobility for a Wireless World
>
>
>
> Connection Services Ltd is a company incorporated under the laws of England
> and Wales with company number 6520674 whose registered office is at Griffins
> Court, 24-32 London Road, Newbury, Berkshire, RG14 1JX. The information in
> this e-mail and any attachments is confidential and may be legally
> privileged. It is intended solely for the addressee or addressees. If you
> are not an intended recipient, please delete the message and any attachments
> and notify the sender of misdelivery: any use or disclosure of the contents
> of either is unauthorised and may be unlawful. All liability for viruses is
> excluded to the fullest extent permitted by law. Any views expressed in this
> message are those of the individual sender. In accordance with the
> provisions of its Terms of Business the Company does not accept instructions
> or the creation of contractual obligations by unconfirmed electronic
> transmission.
>
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



-- 
A computer without Windows is like chocolate cake without mustard.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Java Mapscript problem

2011-08-02 Thread Gastón Lucero

Hi, i have this exception in my java class

Exception in thread "main" java.lang.UnknownError: loadLabel(): Unknown 
identifier. Parsing error near (STYLE):(line 871)

at edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method)
at edu.umn.gis.mapscript.mapObj.(mapObj.java:285)
at MapServerCore$MapServer.createMap(MapServerCore.java:77)
at MapServerCore.(MapServerCore.java:35)
at MapServerCore.main(MapServerCore.java:16)

This is the label of the layer that throw error
...
LABEL
FONT arial-bold
TYPE truetype
SIZE 8
COLOR "#ff"
OUTLINECOLOR 82 146 57
STYLE
GEOMTRANSFORM labelpoly
COLOR 82 146 57
OFFSET 1 1
END
STYLE
GEOMTRANSFORM labelpoly
COLOR 99 178 66
END
OUTLINEWIDTH 1
MINDISTANCE 200
POSITION auto
PARTIALS false
BUFFER 10
END
...
My environment

MapServer 6.0.0
jdk 1.6.0_24


Any solution ?

Thanks
Disclaimer:

This email and any attachments thereof may contain confidential, privileged, 
proprietary, or otherwise private information. This email is intended solely 
for the use of the individual to whom it is addressed. If you are not the 
intended recipient of the email and its attachments please inform the sender 
immediately and do not disclose the contents to any other person, use it for 
any purpose or store or copy the information in any way and delete this e-mail 
and its attachments from your system. Any views or opinions expressed are 
solely those of the author.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] how does mapserver determine shapefile encoding?

2011-08-02 Thread Lars Lingner
Hello,

I have a shapefile from which I don't really know the encoding. It might
be latin1 or ISO-8559-5. The good thing is, when MapServer is accessing
the shapefile, the labels are shown correct.
QGis is also displaying everything fine.

But when I try to convert with shp2pgsql or ogr I get only garbage back.
I tried different source encodings. Since I need the data to be in the
database I'm now trying to find out where the problem is.

I tried converting the data on different systems (Ubuntu, RedHat), with
postgis/shp2pgsql from repository as well as self compiled. Same
results. Also iconv and recode wasn't a help.

As I said QGis is displaying everything fine it fails in converting the
shapefile too. Opening the dbf in LibreOffice doesn't helped either.

Finally my (odd) questions are: Why does MapServer do everything right?
How is the encoding determined? Can I see somewhere which encoding is
used by MapServer?

Thanks in advance for any pointers.


Lars
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] how does mapserver determine shapefile encoding?

2011-08-02 Thread Carlos Ruiz
Lars,

When you try to load some data to a PostgreSQL server, you can specify the 
encoding to use.

This can be done with client_encoding. For example, if you want to populate a 
table with some CSV file contents, you have 

to do the following:


SET client_encoding = 'LATIN1';
COPY my_table FROM '/usr/file.csv' WITH CSV


Now, when you use shp2pgsql you can't set the client encoding, but you can set 
the default client_encoding of your 

database and every data transfer between some client and your database will be 
encoded properly:

ALTER DATABASE my_database SET client_encoding = 'LATIN1'


Hope this helps

Cheers from Guadalajara, México


IC Carlos Ruiz




From: Lars Lingner 
To: "'mapserver-users@lists.osgeo.org'" 
Sent: Tuesday, August 2, 2011 2:45 PM
Subject: [mapserver-users] how does mapserver determine shapefile encoding?

Hello,

I have a shapefile from which I don't really know the encoding. It might
be latin1 or ISO-8559-5. The good thing is, when MapServer is accessing
the shapefile, the labels are shown correct.
QGis is also displaying everything fine.

But when I try to convert with shp2pgsql or ogr I get only garbage back.
I tried different source encodings. Since I need the data to be in the
database I'm now trying to find out where the problem is.

I tried converting the data on different systems (Ubuntu, RedHat), with
postgis/shp2pgsql from repository as well as self compiled. Same
results. Also iconv and recode wasn't a help.

As I said QGis is displaying everything fine it fails in converting the
shapefile too. Opening the dbf in LibreOffice doesn't helped either.

Finally my (odd) questions are: Why does MapServer do everything right?
How is the encoding determined? Can I see somewhere which encoding is
used by MapServer?

Thanks in advance for any pointers.


Lars
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] how does mapserver determine shapefile encoding?

2011-08-02 Thread Carlos Ruiz
Lars,


Looking at the shp2pgsql documentation, it is possible to specify the shape 
attributes encoding with the -W parameter.
 

IC Carlos Ruiz




From: Lars Lingner 
To: "'mapserver-users@lists.osgeo.org'" 
Sent: Tuesday, August 2, 2011 2:45 PM
Subject: [mapserver-users] how does mapserver determine shapefile encoding?

Hello,

I have a shapefile from which I don't really know the encoding. It might
be latin1 or ISO-8559-5. The good thing is, when MapServer is accessing
the shapefile, the labels are shown correct.
QGis is also displaying everything fine.

But when I try to convert with shp2pgsql or ogr I get only garbage back.
I tried different source encodings. Since I need the data to be in the
database I'm now trying to find out where the problem is.

I tried converting the data on different systems (Ubuntu, RedHat), with
postgis/shp2pgsql from repository as well as self compiled. Same
results. Also iconv and recode wasn't a help.

As I said QGis is displaying everything fine it fails in converting the
shapefile too. Opening the dbf in LibreOffice doesn't helped either.

Finally my (odd) questions are: Why does MapServer do everything right?
How is the encoding determined? Can I see somewhere which encoding is
used by MapServer?

Thanks in advance for any pointers.


Lars
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] how does mapserver determine shapefile encoding?

2011-08-02 Thread Lars Lingner
Hello Carlos,

I should have been be more precise. By using all the tools, shp2pgsql,
iconv, recode I set the "source encoding" parameter. And I tried
different encodings.

My database is configured for utf8. But the problem arise before the
data is send to the database.

With shp2pgsql I generated an sql file, containing wrong character strings.

With ogr2ogr I tried to convert to csv or json just for testing, but
without success.
Depending on the encoding I get garbage or the error message that the
data couldn't be converted to utf8.

Thank you for your answer.

Lars

Am 02.08.2011 22:01, schrieb Carlos Ruiz:
> Lars,
> 
> When you try to load some data to a PostgreSQL server, you can
> specify the encoding to use.
> 
> This can be done with client_encoding. For example, if you want to
> populate a table with some CSV file contents, you have
> 
> to do the following:
> 
> 
> SET client_encoding = 'LATIN1'; COPY my_table FROM '/usr/file.csv'
> WITH CSV
> 
> 
> Now, when you use shp2pgsql you can't set the client encoding, but
> you can set the default client_encoding of your
> 
> database and every data transfer between some client and your
> database will be encoded properly:
> 
> ALTER DATABASE my_database SET client_encoding = 'LATIN1'
> 
> 
> Hope this helps
> 
> Cheers from Guadalajara, México
> 
> 
> IC Carlos Ruiz
> 
> 
> 
>  From: Lars Lingner
>  To: "'mapserver-users@lists.osgeo.org'"
>  Sent: Tuesday, August 2, 2011 2:45
> PM Subject: [mapserver-users] how does mapserver determine shapefile
> encoding?
> 
> Hello,
> 
> I have a shapefile from which I don't really know the encoding. It
> might be latin1 or ISO-8559-5. The good thing is, when MapServer is
> accessing the shapefile, the labels are shown correct. QGis is also
> displaying everything fine.
> 
> But when I try to convert with shp2pgsql or ogr I get only garbage
> back. I tried different source encodings. Since I need the data to be
> in the database I'm now trying to find out where the problem is.
> 
> I tried converting the data on different systems (Ubuntu, RedHat),
> with postgis/shp2pgsql from repository as well as self compiled.
> Same results. Also iconv and recode wasn't a help.
> 
> As I said QGis is displaying everything fine it fails in converting
> the shapefile too. Opening the dbf in LibreOffice doesn't helped
> either.
> 
> Finally my (odd) questions are: Why does MapServer do everything
> right? How is the encoding determined? Can I see somewhere which
> encoding is used by MapServer?
> 
> Thanks in advance for any pointers.
> 
> 
> Lars ___ mapserver-users
> mailing list mapserver-users@lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] how does mapserver determine shapefile encoding?

2011-08-02 Thread Daniel Morissette

On 11-08-02 03:45 PM, Lars Lingner wrote:


Finally my (odd) questions are: Why does MapServer do everything right?
How is the encoding determined? Can I see somewhere which encoding is
used by MapServer?



MapServer has no way to tell the encoding of a shapefile. However it can 
usually deal with data in either UTF-8 or in the native encoding of your 
TTF font without specifying any encoding in the LABEL. In those cases, 
it does not try to figure the encoding, it just lets the bytes go 
straight through without looking at them (and TrueType does the rest).


--
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] how does mapserver determine shapefile encoding?

2011-08-02 Thread Daniel Morissette

On 11-08-02 04:59 PM, Daniel Morissette wrote:

On 11-08-02 03:45 PM, Lars Lingner wrote:


Finally my (odd) questions are: Why does MapServer do everything right?
How is the encoding determined? Can I see somewhere which encoding is
used by MapServer?



MapServer has no way to tell the encoding of a shapefile. However it can
usually deal with data in either UTF-8 or in the native encoding of your
TTF font without specifying any encoding in the LABEL. In those cases,
it does not try to figure the encoding, it just lets the bytes go
straight through without looking at them (and TrueType does the rest).



Err... I mean FreeType does the rest...

--
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] MapServer as WMS client - HTTPS CERTIFICATE problem.

2011-08-02 Thread Bob Basques

All, 

Ok, got the debugging to spit out the actual request for a service, with the 
following CERT error :: 


[Tue Aug  2 16:21:59 2011].998742 CGI Request 1 on process 14407 
[Tue Aug  2 16:22:00 2011].23599 msHTTPExecuteRequests(): HTTP request error. 
HTTP: request failed with curl error code 60 (SSL certificate problem, ve 
rify that the CA cert is OK. Details: 
error:14090086:SSL routines:func(144):reason(134)) for 
https://xxx.xx.xx.xx/ArcGIS/services/StPaul/ParcelPolyWMSF/MapServer/WMSServer?LAYERS=0&;
 
REQUEST=GetMap&SERVICE=WMS&FORMAT=image/png24&STYLES=&HEIGHT=331&VERSION=1.1.1&SRS=EPSG:202011&WIDTH=943&BBOX=577250.000302263,157778.662078316,581708.
 
889731801,159343.765366945&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage
 
[Tue Aug  2 16:22:00 2011].23974 msDrawWMSLayerLow(): WMS server error. WMS 
GetMap request failed for layer 'Parcel Polygons' (Status -60: SSL certific 
ate problem, verify that the CA cert is OK. Details: 
error:14090086:SSL routines:func(144):reason(134)). 
[Tue Aug  2 16:22:00 2011].23989 msDrawMap(): Layer 1 (Parcel Polygons), 0.000s 
[Tue Aug  2 16:22:00 2011].24013 msDrawMap(): Drawing Label Cache, 0.000s 
[Tue Aug  2 16:22:00 2011].24026 msDrawMap() total time: 0.025s 
[Tue Aug  2 16:22:00 2011].77595 msSaveImage() total time: 0.053s 
[Tue Aug  2 16:22:00 2011].77691 mapserv request processing time (loadmap not 
incl.): 0.079s 
[Tue Aug  2 16:22:00 2011].77701 msFreeMap(): freeing map at 0x7144b0. 

Question, can this be handled in the MAPFILE somehow?  I did verify that the 
request works, once it's sent, by pasting into a Browser that already accepted 
the certificate. 

Thanks 

bobb 

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] MapServer as WMS client - HTTPS CERTIFICATE problem.

2011-08-02 Thread Bob Basques

All, 

I did some more research on this.  Forwarding on my own posting from the user 
list here to ask a question, 

Couldn't the server certificate be added to the request process via a MAPFILE > 
METADATA field for inclusion in the requests, in lieu of adding it to the CURL 
cert request, or am I thinking about this backwards? 

thanks 

bobb 



 



All,  


Ok, got the debugging to spit out the actual request for a service, with the 
following CERT error :: 



[Tue Aug  2 16:21:59 2011].998742 CGI Request 1 on process 14407 
[Tue Aug  2 16:22:00 2011].23599 msHTTPExecuteRequests(): HTTP request error. 
HTTP: request failed with curl error code 60 (SSL certificate problem, ve 
rify that the CA cert is OK. Details: 
error:14090086:SSL routines:func(144):reason(134)) for 
https://xxx.xx.xx.xx/ArcGIS/services/StPaul/ParcelPolyWMSF/MapServer/WMSServer?LAYERS=0&;
 
REQUEST=GetMap&SERVICE=WMS&FORMAT=image/png24&STYLES=&HEIGHT=331&VERSION=1.1.1&SRS=EPSG:202011&WIDTH=943&BBOX=577250.000302263,157778.662078316,581708.
 
889731801,159343.765366945&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage
 
[Tue Aug  2 16:22:00 2011].23974 msDrawWMSLayerLow(): WMS server error. WMS 
GetMap request failed for layer 'Parcel Polygons' (Status -60: SSL certific 
ate problem, verify that the CA cert is OK. Details: 
error:14090086:SSL routines:func(144):reason(134)). 
[Tue Aug  2 16:22:00 2011].23989 msDrawMap(): Layer 1 (Parcel Polygons), 0.000s 
[Tue Aug  2 16:22:00 2011].24013 msDrawMap(): Drawing Label Cache, 0.000s 
[Tue Aug  2 16:22:00 2011].24026 msDrawMap() total time: 0.025s 
[Tue Aug  2 16:22:00 2011].77595 msSaveImage() total time: 0.053s 
[Tue Aug  2 16:22:00 2011].77691 mapserv request processing time (loadmap not 
incl.): 0.079s 
[Tue Aug  2 16:22:00 2011].77701 msFreeMap(): freeing map at 0x7144b0. 


Question, can this be handled in the MAPFILE somehow?  I did verify that the 
request works, once it's sent, by pasting into a Browser that already accepted 
the certificate. 


Thanks 


bobb 


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer as WMS client - HTTPS CERTIFICATE problem.

2011-08-02 Thread Rahkonen Jukka
Hi,

With Windows MS4W is setting the path to local certificate file with 
environment variable CURL_CA_BUNDLE and by default it is 
\ms4w\Apache\conf\ca-bundle\cacert.pem with the setenv.bat
Perhaps you can tell where your modified certificate bundle file is with a 
mapfile too, but I have not tried it.  I have just added new certificates into 
the default cacert.pem.
I am not sure if it it possible to make Mapserver to pass on the --insecure 
parameter for curl to tell it trust anything without checking the certificate 
at all.

Have you read already http://trac.osgeo.org/mapserver/ticket/3070?

-Jukka Rahkonen-

 Bob Basques wrote:

> All,


> I did some more research on this.  Forwarding on my own posting from the user 
> list here to ask a question,


> Couldn't the server certificate be added to the request process via a MAPFILE 
> > METADATA field for inclusion in the requests, in lieu of adding it to the 
> CURL cert request, or am I thinking > about this backwards?


> thanks


> bobb









All,


Ok, got the debugging to spit out the actual request for a service, with the 
following CERT error ::



[Tue Aug  2 16:21:59 2011].998742 CGI Request 1 on process 14407

[Tue Aug  2 16:22:00 2011].23599 msHTTPExecuteRequests(): HTTP request error. 
HTTP: request failed with curl error code 60 (SSL certificate problem, ve

rify that the CA cert is OK. Details:

error:14090086:SSL routines:func(144):reason(134)) for 
https://xxx.xx.xx.xx/ArcGIS/services/StPaul/ParcelPolyWMSF/MapServer/WMSServer?LAYERS=0&;

REQUEST=GetMap&SERVICE=WMS&FORMAT=image/png24&STYLES=&HEIGHT=331&VERSION=1.1.1&SRS=EPSG:202011&WIDTH=943&BBOX=577250.000302263,157778.662078316,581708.

889731801,159343.765366945&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage

[Tue Aug  2 16:22:00 2011].23974 msDrawWMSLayerLow(): WMS server error. WMS 
GetMap request failed for layer 'Parcel Polygons' (Status -60: SSL certific

ate problem, verify that the CA cert is OK. Details:

error:14090086:SSL routines:func(144):reason(134)).

[Tue Aug  2 16:22:00 2011].23989 msDrawMap(): Layer 1 (Parcel Polygons), 0.000s

[Tue Aug  2 16:22:00 2011].24013 msDrawMap(): Drawing Label Cache, 0.000s

[Tue Aug  2 16:22:00 2011].24026 msDrawMap() total time: 0.025s

[Tue Aug  2 16:22:00 2011].77595 msSaveImage() total time: 0.053s

[Tue Aug  2 16:22:00 2011].77691 mapserv request processing time (loadmap not 
incl.): 0.079s

[Tue Aug  2 16:22:00 2011].77701 msFreeMap(): freeing map at 0x7144b0.


Question, can this be handled in the MAPFILE somehow?  I did verify that the 
request works, once it's sent, by pasting into a Browser that already accepted 
the certificate.


Thanks


bobb



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users