[mapserver-users] CONFIG "ON_MISSING_DATA" "IGNORE" does not work on 5.6.8

2012-02-15 Thread Stephen Woodbridge
I can not get CONFIG "ON_MISSING_DATA" "IGNORE" to work on mapserver 
5.6.8. I'm doing WMS requests and I get the error on the image.


MapServer version 5.6.8 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV 
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


The map file has:

  CONFIG "ON_MISSING_DATA" "IGNORE"
  CONFIG MS_ERRORFILE "stderr"

  WEB
METADATA
  labelcache_map_edge_buffer "-10"
  ows_title "Peru_900913_WMS"
  ows_onlineresource 
"http://example.com/cgi-bin/mapserv?map=/u/data/peru.map&";

  ows_srs "EPSG:4326 EPSG:900913"
  ows_feature_info_mime_type "text/html"
  ows_enable_request "GetMap"
# I tried this also, but error message still inimage.
#  ows_exceptions_format "application/vnd.ogc.se_xml"
END
  END

Seems like CONFIG "ON_MISSING_DATA" "IGNORE" should do what the doc says 
it should do, but I can't find the magic incantation to make this work.


Anyone know how to do this?

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


RE: [mapserver-users] RE: Circles around points in miles

2012-02-15 Thread Ian Walberg
Stephen,

That appears to do the trick.

Many thanks

Ian

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen
Woodbridge
Sent: Wednesday, February 15, 2012 10:36 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] RE: Circles around points in miles

On 2/15/2012 1:23 PM, Ian Walberg wrote:
> Steve,
>
> Thanks again for the info so far.
>
> Testing this today we realise (not surprisingly) that both the size 
> and width of the symbol are now in miles.
>
> Ideally we would like to set the radius of the circle in miles and the

> width in pixels.
>
> Is there any way of doing this?

Yes, add minwidth 1 and maxwidth 1 to force the width to 1 pixel.

-Steve W

> Regards
>
> Ian
>
> -Original Message-
> From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us]
> Sent: Monday, February 13, 2012 2:57 PM
> To: Ian Walberg; mapserver-users@lists.osgeo.org
> Subject: RE: Circles around points in miles
>
> I jumped the gun on the geomtransform idea. The support is there but 
> because it operates at the style level buffer distances must be given 
> in pixels and there's no easy way to convert a map distance (e.g. 10 
> miles) to pixels. I really should make some runtime constants (for 
> example, extent, scale and cellsize) available to expressions- then 
> you could do this.
>
> Glad you picked option 2 to start.
>
> Steve
>
> -Original Message-
> From: Ian Walberg [mailto:ian.walb...@airborne.aero]
> Sent: Monday, February 13, 2012 4:38 PM
> To: Lime, Steve D (DNR); mapserver-users@lists.osgeo.org
> Subject: RE: Circles around points in miles
>
> Steve,
>
> Many thanks for the help and we have just tested option 2 and that 
> works.
>
> We are using 6.x but are not exactly sure how to use the geomtransform

> to do this. Do you have  an example?
>
> Regards
>
> Ian
>
> -Original Message-
> From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us]
> Sent: Monday, February 13, 2012 9:37 AM
> To: Ian Walberg; mapserver-users@lists.osgeo.org
> Subject: RE: Circles around points in miles
>
> Couple of options depending on version:
>
>1) 6.x: buffer the points using a style geomtransform
>2) all versions: use layer SIZEUNITS to draw a circle symbol in 
> miles
>
> I think option 1 is more flexible but option 2 is probably faster.
>
> Steve
>
> -Original Message-
> From: mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Ian 
> Walberg
> Sent: Saturday, February 11, 2012 10:06 PM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] Circles around points in miles
>
>
> We need to draw circles of 50 and 100 miles around a list of points.
>
> How can we do this?
>
> Thanks
>
> Ian
> ___
> 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

___
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] RE: Circles around points in miles

2012-02-15 Thread Stephen Woodbridge

On 2/15/2012 1:23 PM, Ian Walberg wrote:

Steve,

Thanks again for the info so far.

Testing this today we realise (not surprisingly) that both the size and
width of the symbol are now in miles.

Ideally we would like to set the radius of the circle in miles and the
width in pixels.

Is there any way of doing this?


Yes, add minwidth 1 and maxwidth 1 to force the width to 1 pixel.

-Steve W


Regards

Ian

-Original Message-
From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us]
Sent: Monday, February 13, 2012 2:57 PM
To: Ian Walberg; mapserver-users@lists.osgeo.org
Subject: RE: Circles around points in miles

I jumped the gun on the geomtransform idea. The support is there but
because it operates at the style level buffer distances must be given in
pixels and there's no easy way to convert a map distance (e.g. 10 miles)
to pixels. I really should make some runtime constants (for example,
extent, scale and cellsize) available to expressions- then you could do
this.

Glad you picked option 2 to start.

Steve

-Original Message-
From: Ian Walberg [mailto:ian.walb...@airborne.aero]
Sent: Monday, February 13, 2012 4:38 PM
To: Lime, Steve D (DNR); mapserver-users@lists.osgeo.org
Subject: RE: Circles around points in miles

Steve,

Many thanks for the help and we have just tested option 2 and that
works.

We are using 6.x but are not exactly sure how to use the geomtransform
to do this. Do you have  an example?

Regards

Ian

-Original Message-
From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us]
Sent: Monday, February 13, 2012 9:37 AM
To: Ian Walberg; mapserver-users@lists.osgeo.org
Subject: RE: Circles around points in miles

Couple of options depending on version:

   1) 6.x: buffer the points using a style geomtransform
   2) all versions: use layer SIZEUNITS to draw a circle symbol in miles

I think option 1 is more flexible but option 2 is probably faster.

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Ian
Walberg
Sent: Saturday, February 11, 2012 10:06 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Circles around points in miles


We need to draw circles of 50 and 100 miles around a list of points.

How can we do this?

Thanks

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


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


[mapserver-users] RE: Circles around points in miles

2012-02-15 Thread Ian Walberg
Steve,

Thanks again for the info so far.

Testing this today we realise (not surprisingly) that both the size and
width of the symbol are now in miles.

Ideally we would like to set the radius of the circle in miles and the
width in pixels.

Is there any way of doing this?

Regards

Ian

-Original Message-
From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us] 
Sent: Monday, February 13, 2012 2:57 PM
To: Ian Walberg; mapserver-users@lists.osgeo.org
Subject: RE: Circles around points in miles

I jumped the gun on the geomtransform idea. The support is there but
because it operates at the style level buffer distances must be given in
pixels and there's no easy way to convert a map distance (e.g. 10 miles)
to pixels. I really should make some runtime constants (for example,
extent, scale and cellsize) available to expressions- then you could do
this.

Glad you picked option 2 to start.

Steve

-Original Message-
From: Ian Walberg [mailto:ian.walb...@airborne.aero]
Sent: Monday, February 13, 2012 4:38 PM
To: Lime, Steve D (DNR); mapserver-users@lists.osgeo.org
Subject: RE: Circles around points in miles

Steve,

Many thanks for the help and we have just tested option 2 and that
works.

We are using 6.x but are not exactly sure how to use the geomtransform
to do this. Do you have  an example?

Regards

Ian

-Original Message-
From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us]
Sent: Monday, February 13, 2012 9:37 AM
To: Ian Walberg; mapserver-users@lists.osgeo.org
Subject: RE: Circles around points in miles

Couple of options depending on version:

  1) 6.x: buffer the points using a style geomtransform
  2) all versions: use layer SIZEUNITS to draw a circle symbol in miles

I think option 1 is more flexible but option 2 is probably faster.

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Ian
Walberg
Sent: Saturday, February 11, 2012 10:06 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Circles around points in miles


We need to draw circles of 50 and 100 miles around a list of points.

How can we do this? 

Thanks

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


[mapserver-users] Re: Extract Layer Names from MapFile

2012-02-15 Thread Dash
Well, I believe I figured it out using Java.  I am able to use the URL Class
to get the xml from my GetCapabilites request.  Then, I created an
InputStream from the URL Class and pass the InputStream object into my Java
XML parser.  It's actually pretty slick.  Next, I'll try and plug it in to a
JSP page.  Thanks for all the advice and here is the codes for anyone else
who is interested.

import java.io.File;
import java.io.InputStream;
import java.net.URL;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class XMLReader {
  
  public static void main (String[] args) {
try {
  URL getCapabilities = new URL();
  InputStream is = getCapabilities.openStream();

  DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  DocumentBuilder db = dbf.newDocumentBuilder();
  Document doc = db.parse(is);
  doc.getDocumentElement().normalize();
  NodeList nodeList = doc.getElementsByTagName("Layer");
  
  for (int s = 0; s < nodeList.getLength(); s++) {
Node fstNode = nodeList.item(s);
if (fstNode.getNodeType() == Node.ELEMENT_NODE) {
  Element fstElmnt = (Element)fstNode;
  NodeList fstNmElmntLst = 
fstElmnt.getElementsByTagName("Name");
  Element fstNmElmnt = (Element) fstNmElmntLst.item(0);
  NodeList fstNm = fstNmElmnt.getChildNodes();
  System.out.println("MapFile Layer Name : "  + ((Node)
fstNm.item(0)).getNodeValue());
}
  }
  
} catch (Exception e) {
  e.printStackTrace();
}
  }
}

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Extract-Layer-Names-from-MapFile-tp4472664p4473199.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Extract Layer Names from MapFile

2012-02-15 Thread Jeff McKenna

On 12-02-15 12:05 PM, Dash wrote:

Is there a way to obtain a list of layer names from a mapfile.  I need to
compare a user defined list of layers with available layers in a mapfile.  I
would like to makes this dynamic but I don't see an easy way of returning a
list of layer names from the mapfile.  Any input would be greatly
appreciated.

Don't forget about the trusty shp2img utility, that does return each 
layer name from a mapfile.  I can imagine some js/php magic to parse 
that response.


-jeff





--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


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


Re: [mapserver-users] WMS image size issue

2012-02-15 Thread Havard Tveite

Your WMS seems to work fine for me in QGIS 1.7.3.
I tried the layer "MS".

Håvard

On 2/15/2012 2:09 PM, Raffaele Morelli wrote:

Hi, (sorry for double posting but I forgot the subject in the previous email)

I am working on a wms server and no matter how I try increasing MAXSIZE value I 
always get this error when trying to import my wms layer in Qgis

msWMSLoadGetMapParams(): WMS server error. Image size out of range, WIDTH and 
HEIGHT must be between 150

here's the wms online resource 
http://cen.isprambiente.it/cgi-bin/rf_mapserv?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
 


MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS 
SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

any suggestion?

regards
-raffaele


--
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Re: Extract Layer Names from MapFile

2012-02-15 Thread Stephen Woodbridge

On 2/15/2012 11:36 AM, Dash wrote:

I originally was thinking of parsing the getcapabilites but I don't want the
user to see the file.  I guess I could download the getcapabilites results,
parse the information and then create a list of layer names.  It seems a
little much for such a trivial task


I assume you want to do this in a javascript client, you could write a 
trivial php script and pass it the mapfile name and list of user layers 
and compare them on the server.


Maybe a better question is why do you need to compare them?

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


[mapserver-users] Re: Extract Layer Names from MapFile

2012-02-15 Thread Dash
I originally was thinking of parsing the getcapabilites but I don't want the
user to see the file.  I guess I could download the getcapabilites results,
parse the information and then create a list of layer names.  It seems a
little much for such a trivial task

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Extract-Layer-Names-from-MapFile-tp4472664p4472799.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Extract Layer Names from MapFile

2012-02-15 Thread Jörg Thomsen
Hi,

what about parsing the capabilities-xml?

Jörg

Am 15.02.2012 17:05, schrieb Dash:
> Is there a way to obtain a list of layer names from a mapfile.  I need to
> compare a user defined list of layers with available layers in a mapfile.  I
> would like to makes this dynamic but I don't see an easy way of returning a
> list of layer names from the mapfile.  Any input would be greatly
> appreciated.
> 
> Thanks.
> 
> --
> View this message in context: 
> http://osgeo-org.1560.n6.nabble.com/Extract-Layer-Names-from-MapFile-tp4472664p4472664.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


-- 
~~~
Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der
http://www.foss-akademie.de/
~~~

_

MapMedia
Kartographie und raumbezogene Informationssysteme

Gillweg 3, 14193 Berlin
fon: +49 30 89 06 82-70
fax: +49 30 89 09 53-21
mail: j...@mapmedia.de
net:  www.mapmedia.de
_



Geschäftsführer: G. v. Tschirnhaus, J. Thomsen, P. Stamm
Registergericht, Berlin - Amtsgericht Charlottenburg,
HRB 89625, Umsatzsteuer-Identnummer: DE 813794062
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Extract Layer Names from MapFile

2012-02-15 Thread Dash
Is there a way to obtain a list of layer names from a mapfile.  I need to
compare a user defined list of layers with available layers in a mapfile.  I
would like to makes this dynamic but I don't see an easy way of returning a
list of layer names from the mapfile.  Any input would be greatly
appreciated.

Thanks.

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Extract-Layer-Names-from-MapFile-tp4472664p4472664.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: WMS image size issue (Raffaele Morelli)

2012-02-15 Thread Raffaele Morelli
>
>
> Message: 6
> Date: Wed, 15 Feb 2012 13:12:35 +
> From: Rahkonen Jukka 
> Subject: Re: [mapserver-users] (no subject)
> To: "'mapserver-users@lists.osgeo.org'"
>
> Message-ID:
><84446def76453c439e9e97e438e13a63075...@pasuri.haapa.mmm.fi>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
>
> The bounding boxes are bit odd, check the EXTENTS of your mapfile and
> possibly wms_extent if you have set it.
>  EPSG:32632
> maxy="47.1372" />
>minx="313371" miny="3.93368e+06" maxx="1.31209e+06"
> maxy="5.22041e+06" />
>
>sostegni
>Sostegni
>EPSG:32632
> maxx="173.211" maxy="8.2419e+12" />
>minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07"
> maxy="2.5e+07" />
>
>  Service itself is OK
>
>
>
> http://cen.isprambiente.it/cgi-bin/rf_mapserv?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=469&HEIGHT=354&LAYERS=sostegni&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=-104932.26069053586,3923518.6330312905,1669843.960523528,5263115.183798409&SRS=EPSG:32632&STYLES=
>
> I would guess that QGis is trying to do zoom to a best fit by
> investigating layer extents and resolution and because extents are so wide
> it makes unrealistically big sized request.  QGis will show the image if
> you zoom to correct location by coordinates or by opening a supporting
> vector file on the bottom. OpenJUMP had no problems for me.
>
> -Jukka Rahkonen-


Stange cause I actually got EXTENT from ogrinfo querying a postgis layer as
reported in this example
http://mapserver.org/input/vector/postgis.html#ogrinfo-examples

and here's the relevant output:

Extent: (313371.309628, 3933679.249407) - (1312087.106406, 5220406.386046)

...same error

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


Re: [mapserver-users] Does Mapserver utilise Spatialite spatial index correctly?

2012-02-15 Thread Stephen Woodbridge

On 2/15/2012 7:04 AM, Rahkonen Jukka wrote:

Even Rouault wrote:


Le mardi 14 février 2012 09:24:15, Rahkonen Jukka a écrit :

Rahkonen Jukka wrote:

Even Rouault wrote:

I've commited improvements in GDAL trunk for both points (
http://trac.osgeo.org/gdal/changeset/23944 and
http://trac.osgeo.org/gdal/changeset/23945 ) that make the


above request go


from 1.7 sec to 0.54 sec . I don't think there's any more


significant speed


gain to expect now (at least on OGR side).


Actually, I found a new improvement (committed in
http://trac.osgeo.org/gdal/changeset/23946) that make the


query time go down


to 0.07 sec (*) ! There was a slowness when opening the


layer due to the


presence of an ORDER BY clause in the DATA string, that was


evaluated before


setting the spatial filter.

(*) For comparison, I translated your database to Postgis,


and set-up the


connection mapfile to use that Postgis database (still


through OGR, not the


MapServer Postgis backend). The same request with OGR PG is


run in 0.18 sec.

Awesome!  About 25 times faster in the evening than it was in
the morning. My opinion is that because Spatialite seems to be,
at least in this case, more that two times faster backend for
Mapserver than PostGIS it should lead to some intensive and
controlled testing now.


I updated the cgi-bin directory of my MS4W 3.0.4beta1 with

the mapserv.exe

and dll files taken from the brand new binaries from
http://www.gisinternals.com/sdk/ (contains Mapserver and

GDAL revisions

r13144, r23972, respectively).

As a result Mapserver is really serving me 10, or 25 or

even 40 times

faster than it did before the update measured as WMS throughput
(images/minute). The times include rendering times and all

the lags in the

system so the difference tells exactly how the end user

feels it. Greatest

enhancement is with close zooms because then the apatial index
bites hardest. And at least with my computer Spatialite backend
is clearly faster than PostGIS with the same data and it may be
even

faster than

shapefiles but it is too early to say that really. But this

is absolutely

something worth more testing.


I tested a bit with shapefiles with your Berlin OSM database. Even
after adding spatial index (.qix) and attribute index (.idm&  .idn)
on fields in where clauses, it is a bit slower than spatialite. If
you remove all columns from the DBF that are not necessary for the
rendering, it improves things a bit again. You can also try the new
special SQL command "RESIZE table_name" for shapefiles I've
committed yesterday (see http://gdal.org/ogr/drv_shapefile.html )
to adjust columns to their minimum needed size.


I prepared a new Spatialite database from the OSM data of Finland. It
contains 23 points, 48 lines and 44 polygons and takes
700 MB on a disk. I made indexes for everything that is used in the
WHERE selections and the result is just wonderful.  If there is just
few features to render the msDrawMap() takes just 0.01 - 0.10 seconds
per layer (1000x800 sized output). And my computer is eight year old
Windows WP with IDE disks and 1 GB of memory. Rendering lots of
features takes naturally longer time but I do believe that
technically GDAL/OGR/Mapserver side is in the order now and there is
not much room for further improvements there.

Best way for improving the speed of the service from this point is to
generalize the data for rendering at small scales. Spatialite has
Simplify() and SimplifyPreserveTopolygy() functions so it will be
very easy to create simplified versions of the data into the same
database. Features which are unreasonably small for rendering at the
target scale can be sorted out at the same. I can imagine that one
day some clever individual will write a tool that automatically runs
SQL script which creates a set of new tables with simplified
geometries into Spatialite and at the same time writes a
corresponding mapfile which collects those tables as scale dependent
layers under one Mapserver layer group.

By the way, it would be very nice if the full stop at
TopologyExceptions could be avoided. My Spatialite databases are
created by ogr2ogr and self-intersections did not stop OGR then so
perhaps it can be made to tolerate them also in this case. Now I
fixed this problem in a crude way by running "DELETE from osm_polygon
where ST_IsValid(GEOMETRY)<=0".


There is a hack in postGIS that might work here:

update osm_polygon set GEOMETRY=ST_Buffer(GEOMERTY, 0.0) where 
ST_IsValid(GEOMETRY)<=0;


This will fix some if not all the polygons. Then run your delete 
afterwards to clean out the rest. This may/may not work with SpatiaLite.


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


Re: [mapserver-users] (no subject)

2012-02-15 Thread Rahkonen Jukka
Hi,

The bounding boxes are bit odd, check the EXTENTS of your mapfile and possibly 
wms_extent if you have set it.
  EPSG:32632



sostegni
Sostegni
EPSG:32632



 Service itself is OK


http://cen.isprambiente.it/cgi-bin/rf_mapserv?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=469&HEIGHT=354&LAYERS=sostegni&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=-104932.26069053586,3923518.6330312905,1669843.960523528,5263115.183798409&SRS=EPSG:32632&STYLES=

I would guess that QGis is trying to do zoom to a best fit by investigating 
layer extents and resolution and because extents are so wide it makes 
unrealistically big sized request.  QGis will show the image if you zoom to 
correct location by coordinates or by opening a supporting vector file on the 
bottom. OpenJUMP had no problems for me.



-Jukka Rahkonen-




Raffaele Morelli  wrote:
Hi,

I am working on a wms server and no matter how I try increasing MAXSIZE value I 
always get this error when trying to import my wms layer in Qgis

msWMSLoadGetMapParams(): WMS server error. Image size out of range, WIDTH and 
HEIGHT must be between 150

here's the wms online resource 
http://cen.isprambiente.it/cgi-bin/rf_mapserv?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS 
SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

any suggestion?

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


[mapserver-users] WMS image size issue

2012-02-15 Thread Raffaele Morelli
Hi, (sorry for double posting but I forgot the subject in the previous
email)

I am working on a wms server and no matter how I try increasing MAXSIZE
value I always get this error when trying to import my wms layer in Qgis

msWMSLoadGetMapParams(): WMS server error. Image size out of range, WIDTH
and HEIGHT must be between 150

here's the wms online resource
http://cen.isprambiente.it/cgi-bin/rf_mapserv?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

any suggestion?

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


[mapserver-users] (no subject)

2012-02-15 Thread Raffaele Morelli
Hi,

I am working on a wms server and no matter how I try increasing MAXSIZE
value I always get this error when trying to import my wms layer in Qgis

msWMSLoadGetMapParams(): WMS server error. Image size out of range, WIDTH
and HEIGHT must be between 150

here's the wms online resource
http://cen.isprambiente.it/cgi-bin/rf_mapserv?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

any suggestion?

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


Re: [mapserver-users] Does Mapserver utilise Spatialite spatial index correctly?

2012-02-15 Thread Rahkonen Jukka
Even Rouault wrote:
> 
> Le mardi 14 février 2012 09:24:15, Rahkonen Jukka a écrit :
> > Rahkonen Jukka wrote:
> > >  Even Rouault wrote:
> > > >> I've commited improvements in GDAL trunk for both points (
> > > >> http://trac.osgeo.org/gdal/changeset/23944 and
> > > >> http://trac.osgeo.org/gdal/changeset/23945 ) that make the
> > > 
> > > above request go
> > > 
> > > >> from 1.7 sec to 0.54 sec . I don't think there's any more
> > > 
> > > significant speed
> > > 
> > > >> gain to expect now (at least on OGR side).
> > > > 
> > > > Actually, I found a new improvement (committed in
> > > > http://trac.osgeo.org/gdal/changeset/23946) that make the
> > > 
> > > query time go down
> > > 
> > > > to 0.07 sec (*) ! There was a slowness when opening the
> > > 
> > > layer due to the
> > > 
> > > > presence of an ORDER BY clause in the DATA string, that was
> > > 
> > > evaluated before
> > > 
> > > > setting the spatial filter.
> > > > 
> > > > (*) For comparison, I translated your database to Postgis,
> > > 
> > > and set-up the
> > > 
> > > > connection mapfile to use that Postgis database (still
> > > 
> > > through OGR, not the
> > > 
> > > > MapServer Postgis backend). The same request with OGR PG is
> > > 
> > > run in 0.18 sec.
> > > 
> > > Awesome!  About 25 times faster in the evening than it was in
> > > the morning. My opinion is that because Spatialite seems to
> > > be, at least in this case, more that two times faster backend
> > > for Mapserver than PostGIS it should lead to some intensive
> > > and controlled testing now.
> > 
> > I updated the cgi-bin directory of my MS4W 3.0.4beta1 with 
> the mapserv.exe
> > and dll files taken from the brand new binaries from
> > http://www.gisinternals.com/sdk/ (contains Mapserver and 
> GDAL revisions
> > r13144, r23972, respectively).
> > 
> > As a result Mapserver is really serving me 10, or 25 or 
> even 40 times
> > faster than it did before the update measured as WMS throughput
> > (images/minute). The times include rendering times and all 
> the lags in the
> > system so the difference tells exactly how the end user 
> feels it. Greatest
> > enhancement is with close zooms because then the apatial index bites
> > hardest. And at least with my computer Spatialite backend is clearly
> > faster than PostGIS with the same data and it may be even 
> faster than
> > shapefiles but it is too early to say that really. But this 
> is absolutely
> > something worth more testing.
> 
> I tested a bit with shapefiles with your Berlin OSM database. 
> Even after adding 
> spatial index (.qix) and attribute index (.idm & .idn) on 
> fields in where 
> clauses, it is a bit slower than spatialite. If you remove 
> all columns from 
> the DBF that are not necessary for the rendering, it improves 
> things a bit 
> again. You can also try the new special SQL command "RESIZE 
> table_name" for 
> shapefiles I've committed yesterday (see 
> http://gdal.org/ogr/drv_shapefile.html 
> ) to adjust columns to their minimum needed size.

I prepared a new Spatialite database from the OSM data of Finland. It contains 
23 points, 48 lines and 44 polygons and takes 700 MB on a disk. I 
made indexes for everything that is used in the WHERE selections and the result 
is just wonderful.  If there is just few features to render the msDrawMap() 
takes just 0.01 - 0.10 seconds per layer (1000x800 sized output). And my 
computer is eight year old Windows WP with IDE disks and 1 GB of memory. 
Rendering lots of features takes naturally longer time but I do believe that 
technically GDAL/OGR/Mapserver side is in the order now and there is not much 
room for further improvements there.

Best way for improving the speed of the service from this point is to 
generalize the data for rendering at small scales. Spatialite has Simplify() 
and SimplifyPreserveTopolygy() functions so it will be very easy to create 
simplified versions of the data into the same database. Features which are 
unreasonably small for rendering at the target scale can be sorted out at the 
same. I can imagine that one day some clever individual will write a tool that 
automatically runs SQL script which creates a set of new tables with simplified 
geometries into Spatialite and at the same time writes a corresponding mapfile 
which collects those tables as scale dependent layers under one Mapserver layer 
group.  

By the way, it would be very nice if the full stop at TopologyExceptions could 
be avoided. My Spatialite databases are created by ogr2ogr and 
self-intersections did not stop OGR then so perhaps it can be made to tolerate 
them also in this case. Now I fixed this problem in a crude way by running 
"DELETE from osm_polygon where ST_IsValid(GEOMETRY)<=0".

-Jukka Rahkonen-



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


[mapserver-users] Re: How to enable a spatial query with MODE=FEATUREQUERY (CGI mode)?

2012-02-15 Thread Eduardo Kanegae
hi all,
Just to close this topic, I put it to work after the folloowing changes:

* mapfile
- Tolerance = 0 at both layers (poly and point layer)
- template is set at both layers
* web template
- inserted a hidden html param named 'slayer' with value = poly_layer
- inserted a radio html param named 'mode' with 'value' = featurequery

now, it's working! :-)

Eduardo

>
> Hi,
>
> I have two layers (poly_layer and point_layer) and using MapServer CGI
> interface I wish to:
> a) - let user click a polygon at 'poly_layer'
> b) - then list attributes of 'point_layer' that are contained into the
> polygon choosen at (a)
>
> At my mapfile, both layers has layer->template property set and at CGI
> interface (web->template) I'm passing:
> - mode = featurequery
> - slayer = poly_layer
> - qlayer = point_layer
>
> But after the click on map, got only a "not found" error.
>
> Am I doing right use of this mode? Or for this need, is it better to
> use another mode?
>
> ps.: all layers are Mapinfo files and can't use PostGIS at this application.
>
> Eduardo Patto Kanegae
> http://www.webmapit.com | @webmapit
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapcache Seed / libpng error?

2012-02-15 Thread thomas bonfort
Is the error always reproducible ?
>From the logs it seems that the png data received by mapcache from the
wms server is corrupt. More investigation would be needed to determine
if the network or the wms server is at fault for this.

regards,

--
thomas

On Wed, Feb 15, 2012 at 04:45, Andrew Cowie
 wrote:
> Hello List,
>
>
>
> We’ve been using mapcache_seed ( mapcache SVN checkout 13002 ) to build our
> caches mostly successfully so far, but recently have come up against an
> error which has only cropped up with a certain layer which includes our text
> & labels
>
>
>
> www-data@server$ ./mapcache_seed -c /opt/mapserver/mapcache/oe_mapcache.xml
> -t 2012-02-02_text_cache_nztm  -g portalgridnztm1 -z 7,8
>
> found old lockfile /tmp/_gc_lock9-175-1233-slope_cache_nztm.lck, deleting it
>
> found old lockfile /tmp/_gc_lock7-7-9-2012-02-02_text_cache_nztm.lck,
> deleting it
>
> found old lockfile /tmp/_gc_lock9-136-179-terr_auth_cache_nztm.lck, deleting
> it
>
> found old lockfile /tmp/_gc_lock9-138-86-wards_cache_nztm.lck, deleting it
>
> seeding tile 65 25 7libpng error: IDAT: CRC error
>
> failed to setjmp(png_jmpbuf(png_ptr))
>
> failed to load image data from metatile
>
> failed to setjmp(png_jmpbuf(png_ptr))
>
> failed to load image data from metatile
>
> seeding tile 130 50 8
>
> www-data@server$
>
>
>
> or...
>
>
>
> www-data@server$ ./mapcache_seed -c /opt/mapserver/mapcache/oe_mapcache.xml
> -t 2012-02-02_text_cache_nztm  -g portalgridnztm1 -z 6,7
>
> found old lockfile /tmp/_gc_lock9-137-51-terr_auth_cache_nztm.lck, deleting
> it
>
> found old lockfile /tmp/_gc_lock9-182-1201-slope_cache_nztm.lck, deleting it
>
> found old lockfile /tmp/_gc_lock9-138-197-wards_cache_nztm.lck, deleting it
>
> seeding tile 25 15 6libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng warning: Ignoring bad adaptive filter type
>
> libpng error: IDAT: CRC error
>
> failed to setjmp(png_jmpbuf(png_ptr))
>
> failed to load image data from metatile
>
> seeding tile 50 35 7failed to setjmp(png_jmpbuf(png_ptr))
>
> failed to load image data from metatile
>
> www-data@server$
>
>
>
>
>
> The next step will be to checkout the latest SVN version. But we are
> currently mid-build with some other layers, so are waiting for them to
> finish before we do that. But thought  we’d fire it out to the list to see
> if anyone has any ideas as to what might be causing this?
>
>
>
>
>
> Below is the mapcache config:
>
>
>
>    
>
>   
>
>  http://server/cgi-bin/mapserv601?
>
>   
>
>   
>
>  
>
>     image/png
>
>     text
>
>     /opt/mapserver/mapfiles/m6scenz_topo_new.map
>
>     true
>
>  
>
>   
>
>    
>
>
>
>    
>
>   src_text_update
>
>   disk
>
>   PNG
>
>   portalgridnztm1
>
>   5 5
>
>   10
>
>    
>
>
>
>
>
> "labelcache_map_edge_buffer"    "-10"    is set in mapserver
> WEB METADATA
>
>
>
>
>
> Cheers
>
>
>
>
>
> Andrew
>
>
>
>
>
>
>
>
>
>
> 
> Please consider the environment before printing this email
> Warning: This electronic message together with any attachments is
> confidential. If you receive it in error: (i) you must not read, use,
> disclose, copy or retain it; (ii) please contact the sender immediately by
> reply email and then delete the emails.
> The views expressed in this email may not be those of Landcare Research New
> Zealand Limited. http://www.landcareresearch.co.nz
>
> ___
> 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.o