Re: [mapserver-users] Postgres SQL oddity . . .

2014-12-15 Thread Rahkonen Jukka (Tike)
Hi,


If vname is unique in your table, why do you need to do select distinct on it?

I would make a blind guess with an alias name select distinct on (vname) 
vname_distinct


Usually it is not as easy, though


-Jukka Rahkonen-





Basques, Bob wrote:

 I'm trying to display a set of GPS points from a layer in Postrgres . . .

 Getting this error however:

ServiceExceptionReport version=1.3.0 
xsi:schemaLocation=http://www.opengis.net/ogc 
http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd;ServiceException
msDrawMap(): Image handling error. Failed to draw layer named 'AVL_Plot_00to96'.
msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  column 
reference vname is ambiguous
LINE 1: select elapsed_min,vname,encode(ST_AsBinary(ST_Force2D(...

/ServiceException/ServiceExceptionReport

from this Call:

DATA the_geom from (

select
distinct on (vname) vname,
st_length(st_transform(the_line, 26993)) as 
feet,
(DATE_PART('day', now() - acqtime) * 24 +
DATE_PART('hour', now() - acqtime) * 60 
+
DATE_PART('minute', now() - acqtime)
) as elapsed_min,  -- Compiled minutes 
since last major move of asset.
*
from
loc
where
st_length(st_transform(the_line, 26993))  30  
-- GPS error
order by
vname desc

) as subquery using unique vname using 
srid=200068

What I don't understand is how VNAME can be ambiguous when calling only one 
table (loc)??  The SQL works fine in PGADMIN.   Does the using unique vname 
have something to do with the problem, which seems to be required.

Help??

Thanks.

bobb


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

Re: [mapserver-users] Interface between QGIS2.4 and MapServer

2014-12-10 Thread Rahkonen Jukka (Tike)
Hi,


I believe you can install the plugin still from the experimental QGIS plugins. 
At least I seem to have it installed on QGIS 2.0.1.


I warn you that the plugin creates mapfiles which are about 80% correct. For 
fixing them to work properly you should know relatively well how to write good 
mapfiles by hand.


-Jukka Rahkonen-


Maiorano Pasquale wrote:

Dear Sirs,

I am trying to export my QGIS project to MapServer without success. I found 
several tutorials on Youtube that speak about a pluging named RT Mapserver 
Export . It seam does not exist anymore. Can You help me giving some advice in 
how to export my project in order to expose it on the WEB via Mapserver?

The mentioned plugin seems disappeared starting from the QGIS version 1.8 on.

Please take into account that my job is locked due to this issue. Many thanks 
in advance.

Pasquale Maiorano


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

Re: [mapserver-users] Problem with Colon in WFS Layer Name

2014-11-03 Thread Rahkonen Jukka (Tike)
Hi,

Colons are absolutely denied in WFS feature type names and if you want to have 
a standard compliant WFS service you must remove the colon from the name.

https://www.mail-archive.com/geoserver-users@lists.sourceforge.net/msg20012.html

-Jukka Rahkonen-



Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Hari Pradhan
Lähetetty: 3. marraskuuta 2014 17:27
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Problem with Colon in WFS Layer Name

Hello List,

I am getting the following error when requesting for WFS getfeature on the 
layer which includes colon in it's name (example: Analysis1:VolumeOut:VECTOR).

Failed to parse QName 'ms:Analysis1:'.


It looks like mapserver failed to parse the layer including colon.

But as per the documentation, the restrictions to WFS layer name is that layer 
names can not start with a digit or have spaces in them. I doesn't say anything 
about the colon.

Can anyone help me to resolve this problem?


Note: The layer name is designed to include colon. We can not omit it.

Thanks,
Hari







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

Re: [mapserver-users] Is kerneldensity_attribute implemented?

2014-10-23 Thread Rahkonen Jukka (Tike)
Hi,

Fine, I could make is work with this knowledge. Is it so that the only 
documentation right now is in the RFC and main documentation page 
http://mapserver.org/documentation.html  does not know about dynamic heatmaps 
yet? Might be worth having an own entry in the Output section.

I was trying to normalize my source data. There seems to be some limited 
possibilities for doing that with source layer and kerneldensity layer:
- In source LAYER the attribute to be used for weighting can be selected with 
STYLE SIZE [attribute] END. The [attribute] is selected as it stands and no 
expressions can be used in STYLE - SIZE
- In the kerneldensity LAYER  processing KERNELDENSITY_NORMALIZATION can be 
used for normalizing data by a multiplication factor.
- For more advanced normalization it must be done in the data because for 
example expression [POPULATION]/[AREA] can't be resolved on-the-fly because 
expressions are not supported in STYLE - SIZE.

Have I understood right? With some sources of the point layer data there could 
perhaps be a workaround by computing new field on-the-fly inside LAYER - DATA: 
select geometry, population/area as popar from source and by using then 
popar as size attribute. I made some trials with connnectiontype OGR but it 
was not trivial to make my selection to work from  a shapefile.

-Jukka Rahkonen-

thomas bonfort wrote:

 Jukka,
 All the functionality is tested in msautotest, the KERNELDENSITY_ATTRIBUTE is
 an error is the RFC. To use an attribute use STYLE SIZE [attribute] END in 
 your
 linked vector layer.
 
 --
 thomas
 
 On 23 October 2014 06:55, Rahkonen Jukka (Tike)
 jukka.rahko...@mmmtike.fi wrote:
  Hi,
 
  I have tried to use attribute based weights in heatmaps as in RFC 108
  example http://mapserver.org/development/rfc/ms-rfc-108.html
  processing KERNELDENSITY_ATTRIBUTE=POP2010
 
  However, this processing option does not seem to have any affect. It is not
 used in the MS autotest mapfile and I wonder if it has been implemented at all
 yet. Does somebody know?
 
  -Jukka Rahkonen-
  ___
  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] Is kerneldensity_attribute implemented?

2014-10-23 Thread Rahkonen Jukka (Tike)
Hi,

I made an issue to Github. By browsing through the list of RFCs there may be 
also some other features in Mapserver which are best or only documented in 
corresponding RFCs. That is OK as an initial documentation but if things are a 
'changing and usage is perhaps no more exactly as it was written to RFC. It 
looks like there is usually no considerations in  RFCs about how and where to 
document the fine new features for the users.

-Jukka Rahkonen-


Yves Jacolin wrote:
 
 Hello,
 
 If documentation is not uptodate you can either send a PR or create an issue
 with some text and information (where? what?).
 
 More information you give, easier and better it is for us.
 
 Y.
 On Thursday, October 23, 2014 8:21:03 Rahkonen Jukka wrote:
  Hi,
 
  Fine, I could make is work with this knowledge. Is it so that the only
  documentation right now is in the RFC and main documentation page
  http://mapserver.org/documentation.html  does not know about dynamic
  heatmaps yet? Might be worth having an own entry in the Output section.
 
  I was trying to normalize my source data. There seems to be some
  limited possibilities for doing that with source layer and
  kerneldensity layer: - In source LAYER the attribute to be used for
  weighting can be selected with STYLE SIZE [attribute] END. The
  [attribute] is selected as it stands and no expressions can be used in 
  STYLE -
 SIZE - In the kerneldensity LAYER 
  processing KERNELDENSITY_NORMALIZATION can be used for normalizing
  data by a multiplication factor. - For more advanced normalization it
  must be done in the data because for example expression
  [POPULATION]/[AREA] can't be resolved on-the-fly because expressions
  are not supported in STYLE - SIZE.
 
  Have I understood right? With some sources of the point layer data
  there could perhaps be a workaround by computing new field on-the-fly
  inside LAYER - DATA: select geometry, population/area as popar from
  source and by using then popar as size attribute. I made some
  trials with connnectiontype OGR but it was not trivial to make my
  selection to work from  a shapefile.
 
  -Jukka Rahkonen-
 
  thomas bonfort wrote:
   Jukka,
   All the functionality is tested in msautotest, the
   KERNELDENSITY_ATTRIBUTE is an error is the RFC. To use an attribute
   use STYLE SIZE [attribute] END in your linked vector layer.
  
   --
   thomas
  
   On 23 October 2014 06:55, Rahkonen Jukka (Tike)
  
   jukka.rahko...@mmmtike.fi wrote:
Hi,
   
I have tried to use attribute based weights in heatmaps as in RFC
108 example http://mapserver.org/development/rfc/ms-rfc-108.html
processing KERNELDENSITY_ATTRIBUTE=POP2010
   
However, this processing option does not seem to have any affect.
It is not
  
   used in the MS autotest mapfile and I wonder if it has been
   implemented at all yet. Does somebody know?
  
-Jukka Rahkonen-
___
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
 
 --
 Responsable Formation et Support
 Camptocamp France SAS
 Savoie Technolac, BP 352
 73377 Le Bourget du Lac, Cedex
 Tel (France) : +33 4 79 26 57 98
 Tel (Suisse) : 021 619 10 43
 Mob. : +33 6 18 75 42 21
 Fax : 04 79 70 15 81
 Mail : yves.jaco...@camptocamp.com
 http://www.camptocamp.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] LAYER example for kernerdensity wanted

2014-10-22 Thread Rahkonen Jukka (Tike)

Jeff McKenna wrote:
Lähetetty: 20. lokakuuta 2014 20:43
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] LAYER example for kernerdensity wanted

On 2014-10-20 2:15 PM, Jeff McKenna wrote:
 Hi Jukka,

 The good news/bad news is that I can reproduce this same issue on
 Windows, with MapServer-master and GDAL (both trunk and 1.11.1 release).
   I have built both MapServer and GDAL in debug mode, and have placed
 the debug messages (and test case) in a ticket at
 https://github.com/mapserver/mapserver/issues/5019  It seems to crash on
 a memcpy call by GDAL, hmmm...


 -jeff


 Update: fixed by EvenR in MapServer-master!  Thanks Even!

Hi Jeff and Even,

It works now for me too with the gisinternals binaries. And it works very well 
indeed.

-Jukka-

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


Re: [mapserver-users] Square Edges Using labelpoly

2014-10-22 Thread Rahkonen Jukka (Tike)
Round edges also with Mapserver 6.5-dev from last night.

-Jukka Rahkonen-

Lime, Steve D wrote:
 
 It's an issue with 6.4, I don't have a 7.0 build handy. I'll try it and see. 
 Thomas
 refactored a bunch of the labeling code in 7.0 so maybe it's not an issue.
 
 -Original Message-
 From: Zach Chehayeb [mailto:zach.cheha...@airborne.aero]
 Sent: Wednesday, October 22, 2014 4:46 PM
 To: Lime, Steve D (MNIT); Håvard Tveite; mapserver-users@lists.osgeo.org
 Subject: RE: [mapserver-users] Square Edges Using labelpoly
 
 The two styles suggestion worked. Thank you both for your help!
 
 Steve,
 
 Do you know if this is still an issue with the current release of mapserver? 
 I am
 running 6.0.3 so I am curious to know if this issue still exists. If so, 
 would you like
 me to raise a ticket for this?
 
 Regards,
 
 Zach
 
 
 -Original Message-
 From: Lime, Steve D (MNIT) [mailto:steve.l...@state.mn.us]
 Sent: Wednesday, October 22, 2014 2:23 PM
 To: Zach Chehayeb; Håvard Tveite; mapserver-users@lists.osgeo.org
 Subject: RE: [mapserver-users] Square Edges Using labelpoly
 
 Seems to be the combination of the fill and the outline that forces the 
 rounded
 outline. Here's a test:
 
   1) Outline, LINEJOIN MITER, LINECAP SQUARE:
 http://maps1.dnr.state.mn.us/cgi-
 bin/mapserv64?map=/usr/local/mapserver/apps/test/labelpoly/test1.mapmod
 e=map
   2) Fill and outline, LINEJOIN MITER, LINECAP SQUARE:
 http://maps1.dnr.state.mn.us/cgi-
 bin/mapserv64?map=/usr/local/mapserver/apps/test/labelpoly/test2.mapmod
 e=map
 
 Besides seemingly not respecting the LINEJOIN/LINECAP values, the label
 polygon doesn't include the baseline decent of the lower case y. Hmmm...
 
 Sure seems like a bug...
 
 However, you can work around it. Just use two styles. One to draw the outline
 and one to fill... (see mapfile below)
 
   3) Two styles, outline uses LINEJOIN MITER, LINECAP SQUARE:
 http://maps1.dnr.state.mn.us/cgi-
 bin/mapserv64?map=/usr/local/mapserver/apps/test/labelpoly/test3.mapmod
 e=map
 
 Steve
 
  snip 
 MAP
   NAME 'test'
   EXTENT 0 0 500 500
   SIZE 500 500
 
   FONTSET 'fonts.list'
 
   SYMBOL
 NAME 'circle'
 TYPE ELLIPSE
 POINTS 1 1 END
 FILLED TRUE
   END
 
   LAYER
 NAME 'label'
 TYPE POINT
 STATUS DEFAULT
 
 FEATURE
   POINTS 50 250 END
   TEXT 'my label text'
 END
 
 LABELITEM 'text'
 CLASS
   LABEL
 POSITION UR
 TYPE TRUETYPE
 FONT 'arial'
 SIZE 40
 COLOR 0 0 0
 STYLE
   GEOMTRANSFORM labelpoly
   # COLOR 255 0 0
   OUTLINECOLOR 255 0 0
   WIDTH 10
   LINEJOIN miter
   LINECAP square
 END # Style
 STYLE
   GEOMTRANSFORM labelpoly
   COLOR 255 0 0
 END # Style
   END # Label
 END
   END
 END
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] On Behalf Of Zach Chehayeb
 Sent: Wednesday, October 22, 2014 1:38 PM
 To: Håvard Tveite; mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] Square Edges Using labelpoly
 
 Håvard,
 
 Thanks for your help. Unfortunately, the polygon did not change when
 specifying LINEJOIN miter (see below) and still has curved edges. Any other
 ideas?
 STYLE
   ANGLE 0
   COLOR 149 149 149
   GEOMTRANSFORM labelpoly
   OFFSET 0 0
   OUTLINECOLOR 149 149 149
   WIDTH 22
   LINEJOIN miter
 END # STYLE
 
 Regards,
 
 Zach
 
 
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] On Behalf Of Håvard Tveite
 Sent: Wednesday, October 22, 2014 12:17 AM
 To: mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] Square Edges Using labelpoly
 
 LINEJOIN miter
 in the STYLE element should work also for labelpoly see
 http://mapserver.org/mapfile/style.html
 
 LABEL
STYLE
  GEOMTRANSFORM labelpoly
  OUTLINECOLOR 255 0 0
  WIDTH 4
  LINEJOIN miter
END # Style
 ...
 END # Label
 
 Håvard
 
 On 2014-10-21 23:37, Zach Chehayeb wrote:
  Hi All,
 
  Does anyone know if it possible to create a labelpoly (as in GEOTRANSFORM
 labelpoly) with straight edges instead of curved edges?
 
  Regards,
 
  Zach
 
 
 
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 
 --
 Håvard Tveite
 Department of Mathematical Sciences and Technology, NMBU Drøbakveien 31,
 POBox 5003, N-1432 Ås, NORWAY
 Phone: +47 64965483 Fax: +47 64965401 http://www.nmbu.no/imt/
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 ___
 mapserver-users mailing list
 

[mapserver-users] Is kerneldensity_attribute implemented?

2014-10-22 Thread Rahkonen Jukka (Tike)
Hi,

I have tried to use attribute based weights in heatmaps as in RFC 108 example 
http://mapserver.org/development/rfc/ms-rfc-108.html
processing KERNELDENSITY_ATTRIBUTE=POP2010

However, this processing option does not seem to have any affect. It is not 
used in the MS autotest mapfile and I wonder if it has been implemented at all 
yet. Does somebody know?

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


Re: [mapserver-users] - Tile index

2014-10-20 Thread Rahkonen Jukka (Tike)
Hi Scott,

I managed to get PostGIS tileindex work as follows with Mapserver 6.5-dev:

CONNECTIONTYPE OGR
CONNECTION PG:dbname=xxx host=yyy port=5432 user='zzz' 
password='xyz'
DATA select * from tindextest
  #  FILTER geom is not null

and with native connection as
CONNECTIONTYPE postgis
CONNECTION dbname=xxx host=yyy port=5432 user=zzz 
password='xyz'
DATA geom FROM tindextest USING UNIQUE gid USING srid=3067
#FILTER geom is not null

With both connection types I got this error before I commented the FILTER out:
 msEvalExpression(): General error message. Cannot evaluate expression, no 
item index defined.

This feels like a bug that could be a side effect of new development made with 
filters. Make a ticket to Github if you can verify.

-Jukka Rahkonen-



scott...@free.fr
 
 Hi,
 
 I transfer this question to mapserver-users :
 I want to use mapserver with spatial index in postgres/postgis. The mapfile 
 looks
 like :
 
 ..
 
   LAYER
 NAME footprint
 STATUS ON
 TYPE POLYGON
 EXTENT -180 -90 180 90
 CONNECTIONTYPE postgis
 CONNECTION dbname=test host=X.X.X.X port=5432 user='usr'
 password='pwd'
 DATA the_geom FROM view USING UNIQUE id USING srid=4326
 FILTER the_geom is not null
 PROCESSING CLOSE_CONNECTION=DEFER
 OPACITY 100
 PROJECTION
 init=epsg:4326
 END
 CLASS
 NAME 'footprint1'
 STYLE
 WIDTH 2
 OUTLINECOLOR 0 0 0
 OPACITY 10
 END
 END
 CLASS
 NAME 'footprint2'
 STYLE
 WIDTH 2
 OUTLINECOLOR 0 0 0
 END
 END
 END
 
 LAYER
 DEBUG 3
 NAME raster
 STATUS ON
 TYPE RASTER
 OFFSITE 0 0 0
 OPACITY 100
 PROJECTION
 init=epsg:4326
 END
 TILEITEM the_path
 TILEINDEX footprint
 END
 ..
 
 With 6.4.1, everything is ok, raster layer is visible and there is no error 
 in log file.
 But when I try to use this mapfile with 6.5-dev on x64 wheezy, only footprint
 layer is visible. The raster layer is not visible and it seems non item index 
 is
 defined cf log file below :
 
 ..
 msDrawRasterLayerLow(raster): entering.
 msEvalExpression(): General error message. Cannot evaluate expression, no
 item index defined.
 ..
 
 How to defined item index with 6.5-dev ?
 
 Cheers
 
 
 
 
 ___
 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] [mapserver-dev] - Tile index

2014-10-17 Thread Rahkonen Jukka (Tike)
Hi,

I would say that a question like this belongs to mapserver-users list. If 
discussion leads to conclusion that there is a bug in Mapserver the next step 
would be to create a ticket to github or continue discussion about how to fix 
it best on mapserver-dev.

My guess is that you do not use the same mapfiles with your 6.4.1 and 6.5-dev 
on x64 wheezy.
The tileindex should be found from layer panchro but the mapfile in your 
message does not define that layer.

 TILEITEM the_path
 TILEINDEX panchro

-Jukka Rahkonen-

scott159 wrote:

 Hi,
 
 I want to use mapserver with spatial index in postgres/postgis. The mapfile 
 looks
 like :
 
 ..
 
   LAYER
   NAME footprint
   STATUS ON
   TYPE POLYGON
   EXTENT -180 -90 180 90
   CONNECTIONTYPE postgis
   CONNECTION dbname=test host=X.X.X.X
 port=5432 user='usr' password='pwd'
   DATA the_geom FROM view USING UNIQUE id
 USING srid=4326
   FILTER the_geom is not null
   PROCESSING CLOSE_CONNECTION=DEFER
 
   OPACITY 100
   PROJECTION
   init=epsg:4326
   END
   CLASS
   NAME 'footprint1'
   STYLE
   WIDTH 2
   OUTLINECOLOR 0 0
 0
   OPACITY 10
   END
   END
   CLASS
   NAME 'footprint2'
   STYLE
   WIDTH 2
   OUTLINECOLOR 0 0
 0
   END
   END
   END
 
   LAYER
   DEBUG 3
   NAME raster
   STATUS ON
   TYPE RASTER
   OFFSITE 0 0 0
   OPACITY 100
   PROJECTION
   init=epsg:4326
   END
   TILEITEM the_path
   TILEINDEX panchro
   END
 ..
 
 With 6.4.1, everything is ok, raster layer is visible and there is no error 
 in log file.
 But when I try to use this mapfile with 6.5-dev on x64 wheezy, only footprint
 layer is visible. The raster layer is not visible and it seems non item index 
 is
 defined cf log file below :
 
 ..
 msDrawRasterLayerLow(raster): entering.
 msEvalExpression(): General error message. Cannot evaluate expression, no
 item index defined.
 ..
 
 How to defined item index with 6.5-dev ?
 
 Thanks a lot
 
 
 
 
 ___
 mapserver-dev mailing list
 mapserver-...@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-dev
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS rendering

2014-10-17 Thread Rahkonen Jukka (Tike)
Hi,


I tested your mapfile and I believe that you indeed have trouble with 0.0019 
meters wide box symbol that does not show easily.
If you leave out sizeunits or use the default unit pixels and size of around 
10 the symbol should show at all scales. Of course you can use meters as well 
with some reasonable value as size.

Some comments about your mapfile:
- Do not use the same name for the whole service (MAP-NAME) and a layer 
(LAYER-NAME). In this case it does not matter because you have only one layer. 
If you add more, with layers=test you would get all layers that you have in 
the mapfile.
- MAP-UNITS should match the MAP-PROJECTION, thus correct for you is UNITS DD

For the developers, shouldn't we have some built-in symbols for the points so 
that poor new users would not need to create a symbol before getting points 
visible? Even just a filled circle
SYMBOL
   NAME point
   TYPE ELLIPSE
   POINTS
 1 1
   END
   FILLED TRUE
 END

That would be used automatically if mapfile has only
CLASS
 STYLE
 COLOR 0 0 0
 SIZE 30
 END
END

However, why not to make a built-in support for all these which the SLD 
specification mandates (copied from Geoserver docs):
NameDescription
square  A square
circle  A circle
triangleA triangle pointing up
starfive-pointed star
cross   A square cross with space around (not suitable for hatch fills)
x   A square X with space around (not suitable for hatch fills)

-Jukka Rahkonen-

Håvard Tveite wrote
 Hi Francesco,
 
 Do you get any error messages?
 
 Your map file looks a bit like the example from the WMS Server documentation
 (http://mapserver.org/ogc/wms_server.html),
 and that should be a good starting point.
 
 To make it easier to find the source of your problems, I suggest that you 
 start
 with the basic example in the WMS Server documentation and expand it
 gradually.
 
 Håvard
 
 PS: You are using SIZEUNITS meters in your test layer.  That means that your 
 SIZE
 0.0019 symbols will be very small if you are not operating close to a 1:1 map
 scale.
 
 
 On 2014-10-16 17:04, Francesco Palermo wrote:
  Hello,
  I'm experimenting the use of Mapserver as WMS and I'm encountering some
 problems on map rendering. I'm using a shapefile as a map source and it's a 
 map
 of points (generated by a csv using ogr2ogr - Could I use directly csv with
 Mapserver? I don't know). I can't get the rendering of this map using for
 example QGIS or this URL in the browser (which I hope it's correct):
  http://localhost/cgi-bin/mapserv?map=/home/francesco/shared/mapserver/
 
 wms.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=SRS=
 EPSG:4326
 
 BBOX=9.2990,43.0105,9.4894,43.0524WIDTH=500HEIGHT=300FORMAT=i
 mage/
  pngLAYERS=test
 
  This is the mapfile:
  MAP
   NAME test
   STATUS ON
   SIZE 500 300
   IMAGETYPE PNG
   EXTENT 9.2990 43.0105 9.4894 43.0524
   UNITS METERS
   DEBUG 5
   PROJECTION
  init=epsg:4269
   END
   WEB
   TEMPLATE template.html
   IMAGEPATH /var/www/html/tmp/
   IMAGEURL /tmp/
   METADATA
   wms_title   WMS Demo Server
   wms_onlineresource http://localhost/cgi-bin/mapserv?;
   wms_srs   EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326
   wms_enable_request *
   END
   END
   #IMAGECOLOR 255 255 255
   TRANSPARENT ON
   SHAPEPATH oilspill/
   OUTPUTFORMAT
 NAME png
 DRIVER AGG/PNG
 MIMETYPE image/png
 IMAGEMODE RGB
 EXTENSION png
 FORMATOPTION GAMMA=0.75
   END
   SYMBOL
 NAME square
 TYPE vector
 POINTS
   0 0
   0 1
   1 1
   1 0
   0 0
 END
 FILLED true
 ANCHORPOINT 0.5 0.5
   END
   LAYER
 NAME test
 TYPE POINT
 STATUS DEFAULT
 DATA timestep24
 DEBUG 5
 SIZEUNITS meters
 PROJECTION
  init=epsg:4269
 END
 METADATA
   wms_titletest
 END
 CLASSITEM weight
 CLASS
 STYLE
 COLOR #1014FF
 SYMBOL square
 SIZE 0.0019
 END
 END
   END
  END
 
  Any suggestions? Are there any errors in the mapfile? Or am I wrong in the
 procedure?
 
  Thanks,
  Francesco
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 
 
 --
 Håvard Tveite
 Department of Mathematical Sciences and Technology, NMBU Drøbakveien 31,
 POBox 5003, N-1432 Ås, NORWAY
 Phone: +47 64965483 Fax: +47 64965401 http://www.nmbu.no/imt/
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] STYLEITEM AUTO and LABEL ENCODING can't exist simultaneously??

2014-10-13 Thread Rahkonen Jukka (Tike)
Hi,

It seems that you have done a good work by studying the situation yourself and 
it looks like combination “styleitem auto” and “encoding GB18030” does not work 
in your environment. However, it is unlikely that you will get any better 
answer that this one I am writing because you are using version 5.2.1 which was 
released 2008-12-08.  There can’t be many users worldwide who are using that 
old version, Chinase character set, and data from MapInfo TAB.

I suggest you to update to version 6.5-dev or at least 6.4.1 and repeat your 
test. If it still fails, prepare a test package with a small sample of MapInfo 
data and a minimal but complete mapfile so other users and developers can 
reproduce the issue.

-Jukka Rahkonen-


TENGDA wrote:

Hi All,

Is there any method that I can both set 'STYLEITEM AUTO', and also set ENCODING 
GB18030?  NOTE: my mapserv is V5.2.1.

[PROBLEM]:
I am now using mapinfo tab files as my map data. 
Labels in the mapinfo files are in Chinese. In order to support styles within 
mapinfo, I use 'STYLEITEM AUTO'. 
Then style are displayed well, however, Chinese characters are not displayed 
properly.

[PROBLEM DESCRIPTION]:
• Mapserver version: 5.2.1.
MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF
 OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICO
NV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUP
PORTS=THREADS SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS INPUT=OGR
 INPUT=GDAL INPUT=SHAPEFILE
• ogrinfo of tab file:
OGRFeature(2000_BJ10):4
  blank (String) = 
  Style = LABEL(t:育,a:0.00,s:1.38g,c:#00,p:1,f:)
  POINT (1017054046.578231 612967797.60216415)

[CONFUSING]:
• When I use STYLEITEM AUTO, I can't set 'ENCODING GB18030' for LABEL. 
• If not using STYLEITEM AUTO, I can't set LABELITEM, because the chinese 
character is within Style=LABEL(t:Chinese character).
Method I also tried includes:
• Change mapfile encoding from ANSI to UTF-8
• Change MIF/MID encoding from ANSI to UTF-8, or even to BIG5.
So, is there any method that I can both set 'STYLEITEM AUTO', and also set 
ENCODING GB18030?  NOTE: my mapserv is V5.2.1.

[MORE INFORMATION]:
I also have another mapinfo tab file, whose data is like this:
ENAME2000: String (50.0)
OGRFeature(省界):1
  NAME (String) = 北京市
  AREA (Real) =             1.733
  PERIMETER (Real) =             8.498
  省界_ (Real) =           9
  省界_ID (Real) =          11
  CODE2000 (Real) = 11
  ENAME2000 (String) = Beijing Municipality
  Style = BRUSH(fc:#f0f0f0,bc:#ff,id:mapinfo-brush-2.ogr-brush-0);PEN(w:1p
x,c:#d0d0d0,id:mapinfo-pen-2.ogr-pen-0)
In this situation, I can use one layer with 'STYLEITEM AUTO' to display styles, 
and another layer with 'LABELITEM NAME' and LABEL ... END to display Labels, 
without any problem. Mapfile is as follow:
    LAYER
  ##DATASOURCETYPE 0
  NAME test
  TYPE polygon
  STATUS DEFAULT
  OPACITY 100
  SIZEUNITS pixels
  DATA 省界
  CONNECTION 
C:\ms4w\Apache\htdocs\mapinfo\省界.TAB
  CONNECTIONTYPE ogr
  STYLEITEM AUTO
  PROJECTION
    AUTO
  END
  CLASS
    NAME Untitled 
class
  END
    END
    LAYER
  ##DATASOURCETYPE 0
  NAME 省界
  TYPE annotation
  STATUS DEFAULT
  OPACITY 100
  SIZEUNITS pixels
  DATA 省界
  CONNECTION 
C:\ms4w\Apache\htdocs\mapinfo\省界.TAB
  CONNECTIONTYPE ogr
  PROJECTION
    AUTO
  END
  LABELITEM NAME
  CLASS
    NAME Untitled 
class
    LABEL
  

Re: [mapserver-users] WFS DescribeFeatureType returns string for all attributes

2014-10-10 Thread Rahkonen Jukka (Tike)
Hi,

TinyOWS publish the schema automatically right and it belongs to the Mapserver 
family. Perhaps you could have a try with it? Live test server here
http://hip.latuviitta.org/cgi-bin/tinyows?service=wfsversion=1.0.0request=GetCapabilities

-Jukka Rahkonen-



Steve Toutant wrote:

Hi,
I'm using mapserv 6.4.1 as a wfs server to publish hundreds of layers. Most of 
the Layers are Postgis table or view
DescribeFeatureType on a layer returns string as data type for each 
attributes. This is an issue when we want to flter on WFS layer.

I saw that this issue was discussed years ago
https://github.com/mapserver/docs/issues/65

Before Adding gml_[item name]_type for each non string attributes of every 
layers...Is there a plan to fix this bug?

thank you
Steve


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

Re: [mapserver-users] LAYER example for kernerdensity wanted

2014-09-28 Thread Rahkonen Jukka (Tike)
Hi,

I believe that this kind of lines appear into the Apache error log when I try 
to get heatmap to render:

[Sun Sep 28 19:37:18 2014] [error] [client 127.0.0.1] GDAL: 
GDALOpen(MEM:::DATAPOINTER=03359B30,PIXELS=459,LINES=346,BANDS=1,DATATYPE=Byte,PIXELOFFSET=1,LINEOFFSET=459,
 this=03355E60) succeeds as MEM.\r
[Sun Sep 28 19:37:19 2014] [error] [client 127.0.0.1] Premature end of script 
headers: mapserv.exe
[Sun Sep 28 19:37:19 2014] [error] [client 127.0.0.1] GDAL: 
GDALOpen(MEM:::DATAPOINTER=00FB9B30,PIXELS=459,LINES=346,BANDS=1,DATATYPE=Byte,PIXELOFFSET=1,LINEOFFSET=459,
 this=00FB5E60) succeeds as MEM.\r

-Jukka-



Rahkonen, Jukka wrote:
 
 Hi,
 
 I am running MapServer version 6.5-dev on Windows and I suppose it has the
 support for kerneldensity layers. Could someone show the LAYER part that
 works with the Natural Earth populated places dataset
 http://www.naturalearthdata.com/http//www.naturalearthdata.com/downloa
 d/10m/cultural/ne_10m_populated_places.zip? I have created .qix index but not
 touched the data in other ways.
 
 I have indeed managed to get some coloured stripes out at some scales but
 what I mostly get is Internal server error (http 500). MS_ERRORFILE does not
 show any errors and Apache error log is probably recording just this:
 [Sat Sep 27 21:57:27 2014] [error] [client 127.0.0.1] Premature end of script
 headers: mapserv.exe
 
 My current LAYER (or layers, one for data and one for kerneldensity):
 
 LAYER
 NAME points
 DATA c:\data\ne\ne_10m_populated_places
 TYPE POINT
 STATUS ON
 PROJECTION
 init=epsg:4326
 END
 debug 5
 CLASS
STYLE
SIZE 5
SYMBOL circle
COLOR 200 200 200
OUTLINECOLOR 0 0 0
 END
 END
 END
 layer
 name heatmap
 type raster
 connectiontype kerneldensity
 connection points
 status on
 debug 5
 #processing RANGE_COLORSPACE=HSL
 processing KERNELDENSITY_RADIUS=20
 processing KERNELDENSITY_ATTRIBUTE=RANK_MIN
 #processing KERNELDENSITY_COMPUTE_BORDERS=ON
 processing KERNELDENSITY_NORMALIZATION=AUTO
 offsite 0 0 0
 class
   style
 COLORRANGE  #ff00  #
 DATARANGE 0 32
   end
   style
 COLORRANGE  #  #ffff
 DATARANGE 32 255
   end
 end
   end
 
 What I have tried so far has been to comment out this and that but result 
 seems
 to be always the same.
 
 -Jukka Rahkonen-
 ___
 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] LAYER example for kernerdensity wanted

2014-09-27 Thread Rahkonen Jukka (Tike)
Hi,

I am running MapServer version 6.5-dev on Windows and I suppose it has the 
support for kerneldensity layers. Could someone show the LAYER part that works 
with the Natural Earth populated places dataset 
http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip?
 I have created .qix index but not touched the data in other ways.

I have indeed managed to get some coloured stripes out at some scales but what 
I mostly get is Internal server error (http 500). MS_ERRORFILE does not show 
any errors and Apache error log is probably recording just this:
[Sat Sep 27 21:57:27 2014] [error] [client 127.0.0.1] Premature end of script 
headers: mapserv.exe

My current LAYER (or layers, one for data and one for kerneldensity):

LAYER
NAME points
DATA c:\data\ne\ne_10m_populated_places
TYPE POINT
STATUS ON
PROJECTION
init=epsg:4326
END
debug 5
CLASS
   STYLE
   SIZE 5
   SYMBOL circle
   COLOR 200 200 200
   OUTLINECOLOR 0 0 0
END
END
END
layer
name heatmap
type raster
connectiontype kerneldensity
connection points
status on
debug 5
#processing RANGE_COLORSPACE=HSL
processing KERNELDENSITY_RADIUS=20
processing KERNELDENSITY_ATTRIBUTE=RANK_MIN
#processing KERNELDENSITY_COMPUTE_BORDERS=ON
processing KERNELDENSITY_NORMALIZATION=AUTO
offsite 0 0 0
class
  style
COLORRANGE  #ff00  #
DATARANGE 0 32
  end
  style
COLORRANGE  #  #ffff
DATARANGE 32 255
  end
end
  end

What I have tried so far has been to comment out this and that but result seems 
to be always the same.

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


Re: [mapserver-users] Label wrapping question

2014-09-24 Thread Rahkonen Jukka (Tike)
Hi,

Send us some screen captures  of wrapped labels before and after your change. I 
feel that your change would make sense.

-Jukka Rahkonen-

Dejan Gambin wrote:
 
 In the meantime, I have slightly changed msWrapText() function in maplabel.c 
 to
 get what I wanted. If someone is interested I can share the short piece of 
 code.
 
 regards, dejan
 
 
 On 23. ruj. 2014., at 12:32, Dejan Gambin wrote:
 
  Hi,
 
  I have some users wishing to use long legend labels, but they don't fit 
  well on
 my site. As I can see, MapServer is doing this - if maxlength  0 and wrap = 
 'char'
 (usually space), insert a new line at the FIRST wrap character found AFTER
 maxlength character. This is leading to some bad results (label not wrapped or
 wrapped too early).
 
  My question is - shouldn't it be better to wrap at the LAST wrap character
 BEFORE maxlength character? Is this maybe implemented somewhere or there
 are plans for this?
 
  Thanks very much
 
  regards, dejan
  ___
  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] Add the easy way to get GeoJSON from WFS into documentation

2014-09-15 Thread Rahkonen Jukka (Tike)
Hi,

I suggest to add most parts of the mail from Michael Smith 
http://lists.osgeo.org/pipermail/mapserver-users/2013-November/075559.html into 
Mapserver WFS server document http://mapserver.org/ogc/wfs_server.html. It is 
about an easy way for making Mapserver to serve GeoJSON from WFS. Actually, is 
there something that prevents GeoJSON output from being one of the internally 
supported default outputformats without a need to configure it separately in 
each WFS mapfile? It could be deactivated with wfs_getfeature_formatlist if 
necessary.


This is the mail I refer to:

Peter,
You can use OGR outputformats. Add something like this to your mapfile

OUTPUTFORMAT
  NAME geojson
  DRIVER OGR/GEOJSON
  MIMETYPE application/json; subtype=geojson
  FORMATOPTION STORAGE=stream
  FORMATOPTION FORM=SIMPLE
END

Add to your LAYER or MAP METADATA, wfs_getfeature_formatlist geojson
And then in your WFS call add outputformat=geojson.
This will return geojson directly in the browser, if you need it to download, 
you can change the FORMATOPTION to FORM=ZIP
See http://mapserver.org/output/ogr_output.html for more detail.

Mike


-Jukka Rahkonen-

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


Re: [mapserver-users] NoData Gap between rasters - Tileindex Layer

2014-09-10 Thread Rahkonen Jukka (Tike)
Hi,

The image two_separate_files.png reveals the reason. If you look at the seam 
between the images the left side image and right side images do not share the 
same common canvas (pixels are not placed into same common grid). The area that 
you have marked as 000 nodata has not received any image data from either 
image in warping. The warping algorithm has got a result like 51 % of this 
pixel is nodata, I stamp this pixel to nodata or perhaps the center of this 
pixel is nodata, thus the pixel is nodata. When the result is nodata for 
both left and right, there will be a seam.

Milo van der Linden suggests to try different resampling algorithms. It will 
not help because it does not affect the decision if the pixel is data or 
nodata. On the Mapserver side other resampling methods than the default Nearest 
neighbor can give some visual help by blurring the seam but it is not a real 
solution.

Solution that usually helps is the one I have posted to this list in 2014-08-29 
and it is to force the individually warped images to use a common canvas by 
running gdalwarp with parameters -tr and -tap. You have answered that you tried 
it with -tr 0.36 0.36 -tap but that did not help. I left you alone then, sorry 
for that. By the way, is two_separate_files.png from this experiment? I 
suppose not.

I should have asked if 0.36 m is the native resolution of your original images. 
If the pixel size is less than the native one there may still be room for the 
double-nodata pixels. I have used -tr 0.5 -tap when my originals have 0.5 m 
resolution with perfect results.

I would have a new trial with -tr and -tap.  If that does not help there are 
two more things to try:
- Create a mosaic in the original SRS before warping. You can create a .vrt 
file with gdalbuildvrt without wasting any disk space. Run gdalwarp from the 
.VRT file and cut the results into tiles if you need them with gdalwart target 
extents parameter -te xmin ymin xmax ymax.
- If -tap does not compute good aligned target extents you can compute them 
yourself. Here is Python code snippet that we used for several years before 
-tap options existed for widening the output extents to full meters
   minmax = get_minmax(tm32_coords)
   minmax_wider = [
   
(int(math.floor(minmax[0][0])), int(math.floor(minmax[0][1]))),
   (int(math.ceil 
(minmax[1][0])), int(math.ceil (minmax[1][1]))),
   ]

   log(Extents (min,max):  + str(minmax), outfilename)
   log(Widened extents (min,max):  + 
str(minmax_wider), outfilename)

However, the ultimate thing to do is re-consider if it is necessary at all to 
warp the original images into EPSG:3857. Mapserver warps pretty fast on-the-fly 
and I have not warped a single image after the introduction of support for 
different native projections in tileindex. See the -t_srs option 
http://www.gdal.org/gdaltindex.html. For utilizing this feature Mapserver 6.4 
or higher is needed.

-Jukka Rahkonen-



Burkot wrote:

Dear MS Users

Please look at the attachement and maybe you will recognize the problem. I 
think some of you could have encountered this problem with one pixel gap 
between rasterfiles in tileindex layer?


Description:
I have a set of rasters which I warped to epsg:3857 projection using gdalwarp.
During the reprojecting the new raster had been rotated by small angle.
After that I created a tileindex shape file using gdaltindex and configured 
layer:
LAYER
NAME myname
TILEINDEX tilindex.shp
TYPE RASTER
OFFSITE 0 0 0
END

On the result map I see the gaps between raster files in the layer. (See the 
attachment).
Mayby there is a option in gdalwarp command to extend the new image by making 
it 1 pixel widther? May by something like resampling method or algorithm?
Could you please pint me to the solution of this problem?

Thanks in advance

Bartek


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

Re: [mapserver-users] Oracle layer partially drawn

2014-09-09 Thread Rahkonen Jukka (Tike)
Hi,

Perhaps good news is that I could reproduce the issue with your data and 
mapfile on out Oracle 11g and with some old MS4W version. Connection with 
Oracle works but at small scales only part of points are rendered. Rendered 
points are inside rectangular boxes and there can be 1-3 boxes on the screen. 
It looks like the boxes are always in the same locations. When zooming in more 
points appear.

 Bad news is that I fear that developers are not interested in studying this 
issue with such an old Mapserver version because the brand new v. 7.0 will be 
released soon.

I tried to repeat the test with more recent version 6.5-dev which I have 
installed on top of MS4W with the 32-bit binaries from gisinternals.com/sdk. 
Unfortunately I could not make the connection with Oracle to work in a 
reasonable time.  What I tried was to use the included msplugin_oracle.dll by 
editing the mapfile to have
   CONNECTIONTYPE PLUGIN
   PLUGIN msplugin_oracle.dll  

I copied our TNS_NAMES.ORA into very many places, I tried with several 
different SET ORACLE_HOME=  alternatives but the best result I ever had was
msOracleSpatialLayerOpen(): OracleSpatial error. Cannot create OCI Handlers. 
Connection failure. Check the connection string. Error: ORA-12154:

Because these are not mine data I apologize and stop my investigations by now. 
I may have another try if I find some day recent Windows binaries and tested 
instructions about how to make that version to connect with Oracle.  

Regards,

-Jukka Rahkonen-

Geograma wrote:

 Hello,
 
 I can't figure what the problem is... Has anyone been able at least to 
 reproduce
 the problem I have? (to check if the problem could be in my
 computer)
 
 Thanks in advance!
 
 
 
 --
 View this message in context: http://osgeo-org.1560.x6.nabble.com/Oracle-
 layer-partially-drawn-tp5159828p5160664.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Clickable label

2014-09-09 Thread Rahkonen Jukka (Tike)
Hi,

Geoserver 2.5 came with improved GetFeatureInfo 
http://blog.geoserver.org/2014/05/21/geoserver-2-5-1-released/
New implementation of GetFeatureInfo that takes into account symbol shapes, 
offsets, and dynamic line widths into account

Just a couple of weeks ago I published a biggish vector layer with about 1300 
million features with Mapserver. Actually I published the same data as a bunch 
of layers with different classification and some layers renders only a couple 
of classes even at big scale. It feels a bit odd that GetFeatureInfo finds hits 
even if the map shows only empty space. The customer did not complain so I left 
the layers as they were but now I think that my case is a bit analogous - 
What-You-Get-Info-About-Is-Not-What-You-See-On-The-Map.

-Jukka Rahkonen-

Basques, Bob (CI-StPaul) wrote:

 All,
 
 It's probably not the cleanest way to approach it, but maybe a straight
 imagemap type approach.   You use the four corners of the label bounding poly
 and send as an imagemap or json set or id query.
 
 I think the bounding polys need to somehow be thought of as a ad-hoc data
 layer themselves.  Is there a way of sub-selecting feature constructs (that 
 were
 originated by mapserver, like centroids are, into a reusable (on the fly) 
 dataset?
 
 My immediate thoughts were to use a clientside imagemage (which is passe
 these days) and that is where the translation occurs for the bounding boxes, 
 via
 the imagemap generation.
 
 bobb
 
 From: Lime, Steve D (MNIT)
 Sent: Monday, January 20, 2014 9:43 AM
 To: Basques, Bob (CI-StPaul); wiltomap; mapserver-users@lists.osgeo.org
 Subject: RE: [mapserver-users] Clickable label
 
 That or a UTFGrid. I don't believe that support (in master) handles labels but
 maybe it could. In UTFGrid context you wouldn't want to render characters
 anyway, only the bounding polygons. However, because the grid is rendered at a
 lower resolution than the related map label placement consistency might be the
 issue. --Steve 
 From: Basques, Bob (CI-StPaul)
 Sent: Friday, January 10, 2014 6:15 PM
 To: Lime, Steve D (MNIT); wiltomap; mapserver-users@lists.osgeo.org
 Subject: RE: [mapserver-users] Clickable label
 
 Steve,
 
 I've been thinking on this thread since it started, I wonder, could you use a
 imagemap template from Mapserver, but populate it with the Label bounding
 polygons?
 
 bobb
 
 
 
 From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-
 boun...@lists.osgeo.org] on behalf of Lime, Steve D (MNIT)
 [steve.l...@state.mn.us]
 Sent: Friday, January 10, 2014 4:14 PM
 To: wiltomap; mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] Clickable label
 
  This can't be done with stock MapServer. Labels are dynamic by nature and are
 the product of a map raw while queries work off the base data. The bridge
 between the map and a query is a conversion from pixels to map coordinates
 based on map size and extent.
 
 You might be able to pull this off using MapScript. For a query you'd have to 
 do
 things in two stages:
 
   1) Draw the map (in memory) based on the map the user interacted with (same
 extent, size and set of layers) so that a label cache is created.
   2) Search the label cache based on the query point and based on that pull 
 the
 appropriate feature.
 
 I don't know if step 2 is feasible or not. You used to be able to loop 
 through it,
 not sure about now.
 
 There might be other ways using an image where you render text and label
 backgrounds using the same color, a color that you could map back to a feature
 id. The map would basically contain label polygons in a raster you could, in 
 turn,
 query that raster using point and retrieve a feature id. I have doubts that 
 you
 could match the first image to the second so this would be a huge long shot.
 
 Steve
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] On Behalf Of wiltomap
 Sent: Friday, January 10, 2014 2:17 AM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] Clickable label
 
 Hello all,
 
 I have to display labels instead of points on a layer. The labels rely on an
 attribute value. I would like to click on the label to make an attribute 
 windows
 open up. So far, no problem with mapfile configuration...
 
 The only thing is that the attribute window opens up when I click right in the
 middle of the label. I can use TOLERANCEUNITS and TOLERANCE parameters in
 the mapfile to enlarge the clickable area BUT this means that I can also click
 next to the label and get the attribute window, which I don't want to...
 
 My purpose is to get the attribute window whereever I click on the label (any
 part of it) and not if I click next to it. Would you think about a solution 
 to that ?
 
 I enclose a scrennshot of the mapfile I have worked out so far.
 
 
 Many 

Re: [mapserver-users] WMS MSSQL Question

2014-09-09 Thread Rahkonen Jukka (Tike)
Hi,

Probably your layers have not STATUS DEFAULT 
http://mapserver.org/de/faq.html#what-does-status-mean-in-a-layer.  Change the 
status to DEFAULT or add layers=all into your request.

-Jukka Rahkonen-


Tim Nasman wrote:

Hello,

So I have been slowly learning the in's and out's of Mapserver and right now I 
am at an impasse because I am not getting anymore errors to figure out where to 
look next.

I am importing data from a MSSQL database and Mapserver is configured as a WMS. 
When I test the mapfile in shp2img I get the information I want so I know the 
connection is working and as far I know the mapfile is correct, but when I try 
to access the map on my server using

http://localhost/cgi-bin/mapserv.exe?map=C:\mypath\mapfile.mapmode=browse

 I am just receiving a blank box that is the same size as my map size with no 
errors to chase out. So I guess my question would be, where in the mapfile 
should I start digging into to figure out why it is not showing the information 
I want.

Thanks

--
Timothy Nasman
Data Analyst | Programmer
Rolling Leaf Inc.
[V] : 910.274.1436
[E] : tnas...@rollingleaf.commailto:jo...@rollingleaf.com
[https://lh3.googleusercontent.com/-MtYpkPgI7Qg/U0_ISl3BoKI/AFI/MfIufqcCvMM/s144/LOGO-H-1C.png]
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Oracle layer partially drawn

2014-09-03 Thread Rahkonen Jukka (Tike)
Hi,

Could you have arcs in the linestrings in Oracle?  I think that Mapserver 
supports only  Line string whose vertices are connected by straight line 
segments. 
http://docs.oracle.com/cd/B28359_01/appdev.111/b28400/sdo_objrelschema.htm#SPATL494

I am not sure, though, and our documents, which feels also party outdated, do 
not tell anything about curved geometries of Oracle
http://mapserver.org/input/vector/oracle.html 
http://mapserver.org/installation/oracle.html

If you have only straight lines in Oracle then the issue is somewhere else.

-Jukka Rahkonen-

Geograma wrote:
 
 Hello,
 
 With MapServer for Windows (3.0.6 updated to MapServer 6.2.0-beta4), I’m
 writing a “.map” that uses data from an Oracle 11g schema. All looks OK but,
 when a map is requested, only some features are drawn. In the log there is no
 error or warning. Anybody knows what is happening? (any suggestion will be
 appreciated)
 
 Attached are two images, one with the map that should be got (data in a 
 PostGis
 server), another with the map got from Oracle and the “.map” used to generate
 the second image.
 
 http://osgeo-org.1560.x6.nabble.com/file/n5159828/oracle.png
 
 http://osgeo-org.1560.x6.nabble.com/file/n5159828/postgis.png
 
 Tha .map file is as  follows:
 
 MAP
NAME TEST
EXTENT -1450047 2763292 2122072 5658922
   SYMBOLSET symbols.sym
   FONTSET font.list
LEGEND
   IMAGECOLOR -1 -1 -1
   LABEL
  FONT vera
  ANGLE FOLLOW
  COLOR 0 0 0
  ENCODING UTF-8
  TYPE truetype
  SIZE 8
   END
   STATUS ON
   TRANSPARENT ON
END
WEB
   METADATA
  wms_encoding UTF-8
  wms_title title
  wms_abstract 
  wms_srs epsg:23030 epsg:4326
  wms_enable_request *
  wms_onlineresource
 http://v-0049:8080/fcgi-bin/mapserv.exe?map=C:\\ms4w\\maps\\test.map;
  labelcache_map_edge_buffer -10
   END
END
PROJECTION
   init=epsg:23030
END
 
#CONFIG MS_ERRORFILE c:\\ms4w_3_0_6\\maps\\logs\\test.log
#DEBUG 5
 
IMAGECOLOR 153 179 204
 
OUTPUTFORMAT
 NAME png
 DRIVER AGG/PNG
 MIMETYPE image/png
 IMAGEMODE RGB
 EXTENSION png
 FORMATOPTION QUALITY=100
 FORMATOPTION INTERLACE=OFF
 
END
 
LAYER
   NAME geo_r3_500K-1M
   STATUS ON
   TYPE LINE
   CONNECTIONTYPE oraclespatial
   CONNECTION user/pass@service
   DATA geom from geo_r3 using unique id srid 23030
 MAXSCALEDENOM 749210
   MINSCALEDENOM 149750
   TRANSPARENCY 100
   SIZEUNITS pixels
 DUMP TRUE
   PROJECTION
  init=epsg:23030
   END
   CLASS
  STYLE
 INCLUDE 'defs/roundedline.def'
 COLOR 170 170 170
 WIDTH 5
  END
  STYLE
 INCLUDE 'defs/roundedline.def'
 COLOR 255 255 115
 WIDTH 2
  END
  NAME default
   END
   METADATA
  wms_title public.geo_r3_500K-1M
  wms_abstract Capa del Servicio WMS
  wms_extent -971136.125 3134652.25 1051167.75 4846924.0
  gml_include_items all
   END
   PROCESSING CLOSE_CONNECTION=DEFER
END # Layer
 END # Map File
 
 
 
 --
 View this message in context: http://osgeo-org.1560.x6.nabble.com/Oracle-
 layer-partially-drawn-tp5159828.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Oracle layer partially drawn

2014-09-03 Thread Rahkonen Jukka (Tike)
Hi,

Things to try:
 
- Check by other means that your Oracle table really has all the data,.
- Keep DEBUG 5 on.
- Try if OGR connection gives the same result.
- Debug OGR connection more by adding CONFIG CPL_DEBUG ON.
- Remove min/maxscaledenoms (even they do not cause the trouble, otherwise you 
would see nothing).
- Transparency is deprecated, use opacity instead.
- If TRANSPARENCY 100 works it would render totally transparent features and I 
wonder why you see anything.
- Your wms_extent is more strict than extents of the whole mapfile, try if 
commenting it out is changing anything.
- Recreate the spatial index in Oracle.
- Check layer extents in Oracle from ALL_SDO_GEOM_METADATA
- Start from the beginning by downloading some data from 
http://www.naturalearthdata.com/downloads/. Import data into Oracle with 
ogr2ogr and make a new layer from it. Write down everything you do. If you make 
the problem easy enough to reproduce it is possible that someone will pay some 
attention to it.

-Jukka Rahkonen-

Geograma wrote:


 
 Hello Tike,
 
 Instead of checking for arcs, I got images with a point layer and the problem 
 is
 also there, so I think that it could be a problem with the number of features 
 to
 draw (too much?), but I do not know hoy to get the number of features drawn
 for the layer.
 
 The results of the point layer:
 PostGis:
 http://osgeo-org.1560.x6.nabble.com/file/n5159840/postgis2.png
 
 Oracle:
 
 http://osgeo-org.1560.x6.nabble.com/file/n5159840/oracle2.png
 
 
 
 --
 View this message in context: http://osgeo-org.1560.x6.nabble.com/Oracle-
 layer-partially-drawn-tp5159828p5159840.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Oracle layer partially drawn

2014-09-03 Thread Rahkonen Jukka (Tike)
Hi,

For minimizing the possibility that it is some projection error, could you do 
the import again by adding -lco SRID=4326 into the ogr2ogr command? Drop the 
old table first and delete the corresponding row from ALL_SDO_GEOM_METADATA.

-Jukka-

 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Puolesta Geograma
 Lähetetty: 3. syyskuuta 2014 13:57
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: Re: [mapserver-users] Oracle layer partially drawn
 
 Hello Tike,
 
 First, thanks for your help!
 
 - Checked that the layer has all the data (the same records in PostGis and
 Oracle).
 - DEBUG 5 is on
 - Cannot try ORG connection (it gives me an error, I do not know why)
 - Scaledoms, transparency, wms_extent and spatial index recreated in Oracle
 removed but no change
 
 - The test you suggested:
 
· Downloaded:
 http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_
 places.zip
· Loaded info to Oracle using ogr2ogr -f oci oci:user/pass@orcl
 ne_10m_populated_places.shp
· New NE_10M_POPULATED_PLACES.map, as follows:
 ---
 MAP
NAME TEST
EXTENT -180 -90 180 90
SYMBOLSET symbols.sym
FONTSET fonts.txt
DEBUG ON
LEGEND
   IMAGECOLOR -1 -1 -1
   LABEL
  FONT vera
  ANGLE FOLLOW
  COLOR 0 0 0
  ENCODING UTF-8
  TYPE truetype
  SIZE 8
   END
   STATUS ON
   TRANSPARENT ON
END
WEB
   METADATA
  wms_encoding UTF-8
  wms_title WMS
  wms_abstract 
  wms_srs epsg:4326 epsg:23030
wms_enable_request *
  wms_onlineresource
 http://v-0049:8080/fcgi-
 bin/mapserv.exe?map=C:\ms4w\maps\NE_10M_POPULATED_PLACES.map
  labelcache_map_edge_buffer -10
   END
END
PROJECTION
   init=epsg:4326
END
 
CONFIG MS_ERRORFILE
 c:\ms4w_3_0_6\maps\logs\NE_10M_POPULATED_PLACES.log
DEBUG 5
CONFIG CPL_DEBUG ON
CONFIG PROJ_DEBUG ON
 
IMAGECOLOR 153 179 204
 
OUTPUTFORMAT
 NAME png
 DRIVER AGG/PNG
 MIMETYPE image/png
 IMAGEMODE RGB
 EXTENSION png
 FORMATOPTION QUALITY=100
 FORMATOPTION INTERLACE=OFF
END
 
LAYER
   NAME NE_10M_POPULATED_PLACES
   STATUS ON
   TYPE POINT
   CONNECTIONTYPE oraclespatial
   CONNECTION FONDO_2014_06/FONDO_2014_06@orcl
   DATA ora_geometry from NE_10M_POPULATED_PLACES using unique
 ogr_fid srid 4326
   SIZEUNITS pixels
   LABELITEM name
   PROJECTION
  init=epsg:4326
   END
 TYPE truetype
   CLASS
  STYLE
 COLOR 254 0 0
 SIZE 1
  END
  SYMBOL circle
  NAME default
  LABEL
 FONT arial
 ANGLE 0
 COLOR 0 0 0
 TYPE truetype
 SIZE 10
 POSITION Auto
 PARTIALS FALSE
 FORCE FALSE
 OUTLINECOLOR 254 254 254
  END
 END
   METADATA
  wms_title public.smaltown_point_500k
  wms_abstract Capa del Servicio WMS
  #wms_extent -180 -90 180 90
  wms_layer_group /TINSAMaps
  gml_include_items all
   END
   PROCESSING CLOSE_CONNECTION=DEFER
END # Layer
 
 END # Map File
 ---
 
· Request made:
 http://v-0049:8081/fcgi-
 bin/mapserv.exe?map=C:\ms4w_3_0_6\maps\NE_10M_POPULATED_PLACES.m
 apLAYERS=NE_10M_POPULATED_PLACESTRANSPARENT=TRUESERVICE=W
 MSVERSION=1.1.1REQUEST=GetMapSTYLES=FORMAT=image%2FpngSR
 S=EPSG%3A4326BBOX=-180,-90,180,90WIDTH=768HEIGHT=384d
 
· Log got:
 ---
 [Wed Sep 03 12:57:47 2014].724000 CGI Request 1 on process 5764 [Wed Sep
 03 12:57:47 2014].74 msDrawMap(): rendering using outputformat named
 png (AGG/PNG).
 [Wed Sep 03 12:57:47 2014].74 msOracleSpatialLayerOpen called with:
 ora_geometry from NE_10M_POPULATED_PLACES using unique ogr_fid srid
 4326 (Layer pointer 02E88CB8) [Wed Sep 03 12:57:48 2014].49
 msOracleSpatialLayerOpen. Shared connection not available. Creating one.
 [Wed Sep 03 12:57:48 2014].49
 msConnPoolRegister(NE_10M_POPULATED_PLACES,user/pass@orcl,02EB1D08)
 [Wed Sep 03 12:57:48 2014].505000 msOracleSpatialLayerFreeItemInfo was
 called.
 [Wed Sep 03 12:57:48 2014].505000 msOracleSpatialLayerInitItemInfo was
 called.
 [Wed Sep 03 12:57:48 2014].505000 msOracleSpatialLayerWhichShapes was
 called.
 [Wed Sep 03 12:57:48 2014].505000 msOracleSpatialLayerWhichShapes. Using
 this Sql to retrieve the data: SELECT name, ogr_fid,rownum, ora_geometry
 FROM NE_10M_POPULATED_PLACES WHERE SDO_FILTER( ora_geometry,
 MDSYS.SDO_GEOMETRY(2003, :srid,
 NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates
 ),'querytype=window') = 'TRUE'
 [Wed Sep 03 12:57:48 

Re: [mapserver-users] Raster projection troubles - empty image by projection epsg:31255

2014-09-02 Thread Rahkonen Jukka (Tike)
Hi,

Your system seems to have Northing-Easting axis order 
http://epsg-registry.org/report.htm?type=selectionentity=urn:ogc:def:crs:EPSG::31255reportDetail=shortstyle=urn:uuid:report-style:default-with-codestyle_name=OGP%20Default%20With%20Codetitle=EPSG:31255

Check if your BBOX has north coordinates first. If not, flip the coordinates or 
alternatively change your WMS version into 1.1.1 and CRS into SRS and keep your 
BBOX.

-Jukka Rahkonen-

Bartlomiej Burkot wrote:

Hi

I spent much time searching for reason why my raster does not appear in WMS 
layer.
My raster is in EPSG:31255 projection

gdalinfo samle_raster.tif
Driver: GTiff/GeoTIFF
Files: samle_raster.tif
Size is 5000, 4000
Coordinate System is:
PROJCS[MGI / Austria GK Central,
GEOGCS[MGI,
DATUM[Militar_Geographische_Institute,
SPHEROID[Bessel 1841,6377397.155,299.152812808,
AUTHORITY[EPSG,7004]],
TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],
AUTHORITY[EPSG,6312]],
PRIMEM[Greenwich,0],
UNIT[degree,0.0174532925199433],
AUTHORITY[EPSG,4312]],
PROJECTION[Transverse_Mercator],
PARAMETER[latitude_of_origin,0],
PARAMETER[central_meridian,13.33],
PARAMETER[scale_factor,1],
PARAMETER[false_easting,0],
PARAMETER[false_northing,-500],
UNIT[metre,1,
AUTHORITY[EPSG,9001]],
AUTHORITY[EPSG,31255]]
Origin = (-112500.00057683792,274999.99893829226)
Pixel Size = (0.2499589,-0.2499589)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -112500.000,  275000.000) ( 11d50'13.22E, 47d36'16.17N)
Lower Left  ( -112500.000,  274000.000) ( 11d50'14.14E, 47d35'43.80N)
Upper Right ( -111250.000,  275000.000) ( 11d51'13.05E, 47d36'16.95N)
Lower Right ( -111250.000,  274000.000) ( 11d51'13.96E, 47d35'44.57N)
Center  ( -111875.000,  274500.000) ( 11d50'43.59E, 47d36' 0.37N)
Band 1 Block=5000x1 Type=Byte, ColorInterp=Red
  Description = Band_1
  Metadata:
LAYER_TYPE=athematic
Band 2 Block=5000x1 Type=Byte, ColorInterp=Green
  Description = Band_2
  Metadata:
LAYER_TYPE=athematic
Band 3 Block=5000x1 Type=Byte, ColorInterp=Blue
  Description = Band_3
  Metadata:
LAYER_TYPE=athematic

I can show it in qgis and reproject to any coordinate system for example 
epsg:3857.

My mapfile is:
MAP
IMAGETYPE PNG
EXTENT  -12 27 -11 275000
SIZE   800 600
RESOLUTION 72
CONFIG MS_ERRORFILE ../log/ms_error_standard.log
DEBUG 5
NAME myname
CONFIG CPL_DEBUG ON
CONFIG PROJ_DEBUG ON
CONFIG PROJ_LIB /usr/share/proj/

PROJECTION
init=epsg:31255
END
WEB
METADATA
wms_title standard data in wgw
wms_enable_request GetMap GetFeatureInfo GetCapabilities
wms_srs EPSG:31255 EPSG:4326 EPSG:3857 EPSG:2180 EPSG:31287
END
END

LAYER
NAME oneRaster
DATA samle_raster.tif
TYPE RASTER
STATUS ON
PROJECTION
  init=epsg:31255
END
METADATA
wms_title Sample raster
wms_srs EPSG:31255
END

END
END #MAP

I'm using mapserver 6.4.1 in cgi mode on the Ubuntu 14.04 linux installed with 
apt-get install cgi-mapserver:
/usr/lib/cgi-bin/mapserv -v
MapServer version 6.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML 
SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO 
SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG 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=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

When Im requesting a map:
http://myhost/cgi-bin/wmsstandard?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapBBOX=-112516.67630140134133399,273973.2257158225402236,-111233.66681915351364296,275020.36552757304161787CRS=EPSG:31255WIDTH=1038HEIGHT=846LAYERS=oneRasterSTYLES=FORMAT=image/jpegDPI=96MAP_RESOLUTION=96FORMAT_OPTIONS=dpi:96

I got a message in /var/log/apache2/error.log
[Tue Sep 02 15:01:30.386845 2014] [cgi:error] [pid 2057] [client myip:65403] 
AH01215: GDAL: GDALOpen(/pathto/sample.tif, this=0x819310) succeeds as GTiff.
[Tue Sep 02 15:01:30.396083 2014] [cgi:error] [pid 2057] [client myip:65403] 
AH01215: GDAL: GDALClose(/pathto/sample.tif,, this=0x819310)


ms_error_standard.log:
[Tue Sep  2 15:04:45 2014].609914 CGI Request 1 on process 5909
[Tue Sep  2 15:04:45 2014].610243 msWMSLoadGetMapParams(): enabling non-square 
pixels.
[Tue Sep  2 15:04:45 2014].614988 msDrawMap(): kicking into non-square pixel 
preserving mode.
[Tue Sep  2 15:04:45 2014].615034 msDrawMap(): rendering using outputformat 
named AGG_JPEG (AGG/JPEG).
[Tue Sep  2 15:04:45 2014].615064 

Re: [mapserver-users] NoData Gap between rasters - Tileindex Layer

2014-08-29 Thread Rahkonen Jukka (Tike)
Hi,

Run gdalwarp with -tr and -tap http://www.gdal.org/gdalwarp.html. Usually it 
helps.

-Jukka Rahkonen-

Bartlomiej Burkot wrote:

Dear MS Users

I have a set of rasters which I warped to epsg:3857 projection using gdalwarp.
During the reprojecting the new raster had been rotated by small angle.
After that I created a tileindex shape file using gdaltindex and configured 
layer:
LAYER
NAME myname
TILEINDEX tilindex.shp
TYPE RASTER
OFFSITE 0 0 0
END

On the result map I see the gaps between raster files. Please look at images:

http://mmapa.pl/gaps_between_rasters.PNG
http://mmapa.pl/two_separate_files.PNG
http://mmapa.pl/mapserver_layer_as_tileindex.PNG

Maybe some of you recognize the problem. There is the problem with one pixel 
gap between raster files in tileindex layer.

Maybe there is a option in gdalwarp command to extend the new image by making 
it 1 pixel widther? Maybe something like resampling method or algorithm?

I googled similar problem in goeserver:
https://www.mail-archive.com/geoserver-users@lists.sourceforge.net/msg06220.html

Could you please point me to the right solution?

Thanks in advance

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

Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when spaces are encoded as plus symbol in query part of URL

2014-08-26 Thread Rahkonen Jukka (Tike)
Hi,

With a help from the local ESRI support this case is now filed into ESRI bug 
tracker and developers together with something called UAG are now considering 
what to do to with it.

-Jukka Rahkonen-



Hi,

I made some more testing. It seems that the changed behaviour in ArcGIS Server 
10.2.2 affects also other software:
- QGIS 2.0 *can* read layers with spaces in the layer names
- OpenJUMP 1.7 *can't* because it changes spaces to + signs in GetMaps
- Geoserver 2.6 RC1 *can't* cascade layers and the reason is probably the same.

Does anybody know where the ESRI bug tracker is? I would like to file a ticket.

-Jukka-

Rahkonen Jukka wrote:



 Hi,

 What if I have mapfiles in directories my mapfiles and in my+mapfiles 
 (made
 a test and they seem to be OK for Windows) and I use WMS urls
 http://host.com/cgi-bin/mapserv.exe?map=my mapfiles/demo.map and urls
 http://host.com/cgi-bin/mapserv.exe?map=my+mapfiles/demo.map?

 If user sends map=my+mapfiles then the listening party should interpret 
 that +
 means space and search mapfiles from my mapfiles. Theoretical example but
 somehow I feel that using per cent encoding in every place would be more safe
 though not as compact.

 How about the ä case and %C3%A4 vs. %E4? Mapserver generates %E4's
 now and the ArcGIS WMS I should cascade will not accept it even if the problem
 with the space character is solved. Following RFC3986 would solve this 
 problem.

 -Jukka Rahkonen-


 Lime, Steve D wrote:


  The bit of reading I've done indicates that +'s for spaces are still
  allowed by the rfc3986.txt. The + character is still a valid delimiter
  in the query portion of the string. It's silly for ESRI to not support
  either - I mean the trend is towards more compact URLs. MapServer CGI
 processing handles %20 or +...
 
  Adding a switch to toggle + vs %20 encoding would be painful.
 
  Steve
 
  -Original Message-
  From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
  boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka (Tike)
  Sent: Thursday, August 21, 2014 8:28 AM
  To: Mapserver-Users (mapserver-users@lists.osgeo.org)
  Subject: Re: [mapserver-users] [mapserver-dev] FW: WMS request fails
  when spaces are encoded as plus symbol in query part of URL
 
  Hi,
 
  A little bit more information. Here is a GetMap request that returns
  an image from ArcGIS server. Space is changed into %20 and letter
  ä is changed into %C3%A4 . This, according to
  http://www.albionresearch.com/misc/urlencode.php, seems to implement
  RFC3986.
 
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUE
  S
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 
 S=Suomen%20maaper%C3%A4kartta%201:1%2%2TRANSPARENT=T
 
 RUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,
  452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
  The mode where space is encoded as + seems to be something that is
  called
  RFC2396 mode. In this mode letter ä will become %E4. The
  following test where I have only changed %C3%A4  into %E4 proves
  that ArcGIS server does not support RFC2396 mode.
 
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUE
  S
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 
 S=Suomen%20maaper%E4kartta%201:1%2%2TRANSPARENT=TRUE
 
 FORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452
  739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
  If http://www.ietf.org/rfc/rfc3986.txt is newer than
  http://www.ietf.org/rfc/rfc2396.txt I can imagine that there are
  servers which support either the old, or the new, or both, or neither.
  Should ther be a
  RFC2396/RFC3986 switch for selecting the URL-encoding method to use?
  Or is
  RFC2396 deprecated and ESRI is doing the right thing by supporting
  only
  RFC3986 and Mapserver should do the same?
 
 
  -Jukka Rahkonen-
 
 
  Rahkonen Jukka wrote:
  
   Hi,
  
   Here is an ArcGIS WMS to  test with.
  
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/GTKWMS/MapServer/WMSServe
   r?request=GetCapabilitiesservice=WMS
  
   Do it quickly because I have asked the service provider to change
   the layer names, and guess what - because I could not make our
   Mapserver to cascade the service. You will find layer names like
   NameMaaperä
   1:20 000; 1:50 000/Name
  
   I would really much like to know also how the non-ascii characters
   should be handled in the mapfile when cascading such layers.
  
   -Jukka Rahkonen-
  
  
  
   Jeff McKenna wrote:
  
spaces are encoded as plus symbol in query part of URL
   
I agree it's a change that should slip in now for 7.0, but I hope
those with later ArcServer versions can test it in the beta (or we
have one volunteer to let us use their Arc WMS instance for testing).
   
-jeff
   
   
   
On 2014-08-20 1:52 PM, Lime, Steve D (MNIT) wrote:
 Devs: Is this a change that we should make for 7.0? Seems

Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when spaces are encoded as plus symbol in query part of URL

2014-08-21 Thread Rahkonen Jukka (Tike)
Hi,

A little bit more information. Here is a GetMap request that returns an image 
from ArcGIS server. Space is changed into %20 and letter ä is changed into 
%C3%A4 . This, according to http://www.albionresearch.com/misc/urlencode.php, 
seems to implement RFC3986.

http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYERS=Suomen%20maaper%C3%A4kartta%201:1%2%2TRANSPARENT=TRUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=

The mode where space is encoded as + seems to be something that is called 
RFC2396 mode. In this mode letter ä will become %E4. The following test 
where I have only changed %C3%A4  into %E4 proves that ArcGIS server does 
not support RFC2396 mode.

http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYERS=Suomen%20maaper%E4kartta%201:1%2%2TRANSPARENT=TRUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=

If http://www.ietf.org/rfc/rfc3986.txt is newer than 
http://www.ietf.org/rfc/rfc2396.txt I can imagine that there are servers which 
support either the old, or the new, or both, or neither. Should ther be a 
RFC2396/RFC3986 switch for selecting the URL-encoding method to use? Or is 
RFC2396 deprecated and ESRI is doing the right thing by supporting only RFC3986 
and Mapserver should do the same?


-Jukka Rahkonen-


Rahkonen Jukka wrote:
 
 Hi,
 
 Here is an ArcGIS WMS to  test with.
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/GTKWMS/MapServer/WMSServe
 r?request=GetCapabilitiesservice=WMS
 
 Do it quickly because I have asked the service provider to change the layer
 names, and guess what - because I could not make our Mapserver to cascade
 the service. You will find layer names like NameMaaperä 1:20 000; 1:50
 000/Name
 
 I would really much like to know also how the non-ascii characters should be
 handled in the mapfile when cascading such layers.
 
 -Jukka Rahkonen-
 
 
 
 Jeff McKenna wrote:
 
  spaces are encoded as plus symbol in query part of URL
 
  I agree it's a change that should slip in now for 7.0, but I hope
  those with later ArcServer versions can test it in the beta (or we
  have one volunteer to let us use their Arc WMS instance for testing).
 
  -jeff
 
 
 
  On 2014-08-20 1:52 PM, Lime, Steve D (MNIT) wrote:
   Devs: Is this a change that we should make for 7.0? Seems reasonable
   but I'm not sure what the side effects might be.
  
   Steve
  
   *From:*Moen, Paul T. [mailto:pm...@nd.gov]
   *Sent:* Wednesday, August 20, 2014 9:44 AM
   *To:* Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org
   *Subject:* Re: [mapserver-users] WMS request fails when spaces are
   encoded as plus symbol in query part of URL
  
   Steve,
  
   You are right about the outcome of 1 and 2.  1 encodes the % and 2
   throws the following error.
  
   msBuildWMSLayerURLBase(): One of wms_onlineresource,
   wms_server_version, wms_name metadata is missing in layer USGS DRG
   250k Topo Maps.  Please either provide a valid CONNECTION URL, or
   provide those values in the layer's metadata.\n\n
  
   I found the function as you said and
  
   I removed the
  
 if (*i == ' ')
  
  *j = '+';
  
else
  
   from the function then recompiled.
  
   char *msEncodeUrlExcept(const char *data, const char except)
  
   {
  
  char *hex = 0123456789ABCDEF;
  
  const char *i;
  
  char  *j, *code;
  
  int   inc;
  
  unsigned char ch;
  
  for (inc=0, i=data; *i!='\0'; i++)
  
if (msEncodeChar(*i))
  
  inc += 2;
  
  code = (char*)msSmallMalloc(strlen(data)+inc+1);
  
  for (j=code, i=data; *i!='\0'; i++, j++) {
  
if ( except != '\0'  *i == except ) {
  
  *j = except;
  
} else if (msEncodeChar(*i)) {
  
  ch = *i;
  
  *j++ = '%';
  
  *j++ = hex[ch/16];
  
  *j   = hex[ch%16];
  
} else
  
  *j = *i;
  
  }
  
  *j = '\0';
  
  return code;
  
   }
  
   Everything works again after a mapserver recompile, install and
   finally a restart of apache.  Thanks so much for the path to the solution.
  
   Paul Moen
   pm...@nd.gov mailto:pm...@nd.gov
   701-328-2434
  
   *From: *Lime, Steve D (MNIT) steve.l...@state.mn.us
   mailto:steve.l...@state.mn.us
   *Date: *Wednesday, August 20, 2014 at 12:41 AM
   *To: *Paul Moen pm...@nd.gov mailto:pm...@nd.gov,
   mapserver-users@lists.osgeo.org
   mailto:mapserver-users@lists.osgeo.org
   mapserver-users@lists.osgeo.org
   mailto:mapserver-users@lists.osgeo.org
   *Subject: *RE: [mapserver-users] WMS request fails when spaces are
   encoded as plus symbol in query part of URL
  
   Hmmm... Nice backwards 

Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when spaces are encoded as plus symbol in query part of URL

2014-08-21 Thread Rahkonen Jukka (Tike)
Hi,

What if I have mapfiles in directories my mapfiles and in my+mapfiles (made 
a test and they seem to be OK for Windows) and I use WMS urls  
http://host.com/cgi-bin/mapserv.exe?map=my mapfiles/demo.map and urls  
http://host.com/cgi-bin/mapserv.exe?map=my+mapfiles/demo.map?

If user sends map=my+mapfiles then the listening party should interpret that 
+ means space and search mapfiles from my mapfiles. Theoretical example but 
somehow I feel that using per cent encoding in every place would be more safe 
though not as compact.

How about the ä case and %C3%A4 vs. %E4? Mapserver generates %E4's now and 
the ArcGIS WMS I should cascade will not accept it even if the problem with the 
space character is solved. Following RFC3986 would solve this problem.

-Jukka Rahkonen-


Lime, Steve D wrote:

 
 The bit of reading I've done indicates that +'s for spaces are still allowed 
 by the
 rfc3986.txt. The + character is still a valid delimiter in the query portion 
 of the
 string. It's silly for ESRI to not support either - I mean the trend is 
 towards more
 compact URLs. MapServer CGI processing handles %20 or +...
 
 Adding a switch to toggle + vs %20 encoding would be painful.
 
 Steve
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka (Tike)
 Sent: Thursday, August 21, 2014 8:28 AM
 To: Mapserver-Users (mapserver-users@lists.osgeo.org)
 Subject: Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when
 spaces are encoded as plus symbol in query part of URL
 
 Hi,
 
 A little bit more information. Here is a GetMap request that returns an image
 from ArcGIS server. Space is changed into %20 and letter ä is changed into
 %C3%A4 . This, according to
 http://www.albionresearch.com/misc/urlencode.php, seems to implement
 RFC3986.
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUES
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 S=Suomen%20maaper%C3%A4kartta%201:1%2%2TRANSPARENT=T
 RUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,
 452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
 The mode where space is encoded as + seems to be something that is called
 RFC2396 mode. In this mode letter ä will become %E4. The following test
 where I have only changed %C3%A4  into %E4 proves that ArcGIS server
 does not support RFC2396 mode.
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUES
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 S=Suomen%20maaper%E4kartta%201:1%2%2TRANSPARENT=TRUE
 FORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452
 739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
 If http://www.ietf.org/rfc/rfc3986.txt is newer than
 http://www.ietf.org/rfc/rfc2396.txt I can imagine that there are servers which
 support either the old, or the new, or both, or neither. Should ther be a
 RFC2396/RFC3986 switch for selecting the URL-encoding method to use? Or is
 RFC2396 deprecated and ESRI is doing the right thing by supporting only
 RFC3986 and Mapserver should do the same?
 
 
 -Jukka Rahkonen-
 
 
 Rahkonen Jukka wrote:
 
  Hi,
 
  Here is an ArcGIS WMS to  test with.
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/GTKWMS/MapServer/WMSServe
  r?request=GetCapabilitiesservice=WMS
 
  Do it quickly because I have asked the service provider to change the
  layer names, and guess what - because I could not make our Mapserver
  to cascade the service. You will find layer names like NameMaaperä
  1:20 000; 1:50 000/Name
 
  I would really much like to know also how the non-ascii characters
  should be handled in the mapfile when cascading such layers.
 
  -Jukka Rahkonen-
 
 
 
  Jeff McKenna wrote:
 
   spaces are encoded as plus symbol in query part of URL
  
   I agree it's a change that should slip in now for 7.0, but I hope
   those with later ArcServer versions can test it in the beta (or we
   have one volunteer to let us use their Arc WMS instance for testing).
  
   -jeff
  
  
  
   On 2014-08-20 1:52 PM, Lime, Steve D (MNIT) wrote:
Devs: Is this a change that we should make for 7.0? Seems
reasonable but I'm not sure what the side effects might be.
   
Steve
   
*From:*Moen, Paul T. [mailto:pm...@nd.gov]
*Sent:* Wednesday, August 20, 2014 9:44 AM
*To:* Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org
*Subject:* Re: [mapserver-users] WMS request fails when spaces are
encoded as plus symbol in query part of URL
   
Steve,
   
You are right about the outcome of 1 and 2.  1 encodes the % and 2
throws the following error.
   
msBuildWMSLayerURLBase(): One of wms_onlineresource,
wms_server_version, wms_name metadata is missing in layer USGS DRG
250k Topo Maps.  Please either provide a valid CONNECTION URL, or
provide those values in the layer's metadata.\n\n
   
I found the function as you said and
   
I

Re: [mapserver-users] [mapserver-dev] FW: WMS request fails when spaces are encoded as plus symbol in query part of URL

2014-08-21 Thread Rahkonen Jukka (Tike)
Hi,

I made some more testing. It seems that the changed behaviour in ArcGIS Server 
10.2.2 affects also other software:
- QGIS 2.0 *can* read layers with spaces in the layer names 
- OpenJUMP 1.7 *can't* because it changes spaces to + signs in GetMaps
- Geoserver 2.6 RC1 *can't* cascade layers and the reason is probably the same.

Does anybody know where the ESRI bug tracker is? I would like to file a ticket.

-Jukka-

Rahkonen Jukka wrote:


 
 Hi,
 
 What if I have mapfiles in directories my mapfiles and in my+mapfiles 
 (made
 a test and they seem to be OK for Windows) and I use WMS urls
 http://host.com/cgi-bin/mapserv.exe?map=my mapfiles/demo.map and urls
 http://host.com/cgi-bin/mapserv.exe?map=my+mapfiles/demo.map?
 
 If user sends map=my+mapfiles then the listening party should interpret 
 that +
 means space and search mapfiles from my mapfiles. Theoretical example but
 somehow I feel that using per cent encoding in every place would be more safe
 though not as compact.
 
 How about the ä case and %C3%A4 vs. %E4? Mapserver generates %E4's
 now and the ArcGIS WMS I should cascade will not accept it even if the problem
 with the space character is solved. Following RFC3986 would solve this 
 problem.
 
 -Jukka Rahkonen-
 
 
 Lime, Steve D wrote:
 
 
  The bit of reading I've done indicates that +'s for spaces are still
  allowed by the rfc3986.txt. The + character is still a valid delimiter
  in the query portion of the string. It's silly for ESRI to not support
  either - I mean the trend is towards more compact URLs. MapServer CGI
 processing handles %20 or +...
 
  Adding a switch to toggle + vs %20 encoding would be painful.
 
  Steve
 
  -Original Message-
  From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
  boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka (Tike)
  Sent: Thursday, August 21, 2014 8:28 AM
  To: Mapserver-Users (mapserver-users@lists.osgeo.org)
  Subject: Re: [mapserver-users] [mapserver-dev] FW: WMS request fails
  when spaces are encoded as plus symbol in query part of URL
 
  Hi,
 
  A little bit more information. Here is a GetMap request that returns
  an image from ArcGIS server. Space is changed into %20 and letter
  ä is changed into %C3%A4 . This, according to
  http://www.albionresearch.com/misc/urlencode.php, seems to implement
  RFC3986.
 
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUE
  S
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 
 S=Suomen%20maaper%C3%A4kartta%201:1%2%2TRANSPARENT=T
 
 RUEFORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,
  452739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
  The mode where space is encoded as + seems to be something that is
  called
  RFC2396 mode. In this mode letter ä will become %E4. The
  following test where I have only changed %C3%A4  into %E4 proves
  that ArcGIS server does not support RFC2396 mode.
 
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/MapServer/WMSServer?REQUE
  S
 T=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYER
 
 S=Suomen%20maaper%E4kartta%201:1%2%2TRANSPARENT=TRUE
 
 FORMAT=image%2FpngBBOX=434844.4854575534,7035986.957235612,452
  739.30027509434,7144417.839725949SRS=EPSG:3067STYLES=
 
  If http://www.ietf.org/rfc/rfc3986.txt is newer than
  http://www.ietf.org/rfc/rfc2396.txt I can imagine that there are
  servers which support either the old, or the new, or both, or neither.
  Should ther be a
  RFC2396/RFC3986 switch for selecting the URL-encoding method to use?
  Or is
  RFC2396 deprecated and ESRI is doing the right thing by supporting
  only
  RFC3986 and Mapserver should do the same?
 
 
  -Jukka Rahkonen-
 
 
  Rahkonen Jukka wrote:
  
   Hi,
  
   Here is an ArcGIS WMS to  test with.
  
 
 http://gtkdata.gtk.fi/arcgis/services/GTKWMS/GTKWMS/MapServer/WMSServe
   r?request=GetCapabilitiesservice=WMS
  
   Do it quickly because I have asked the service provider to change
   the layer names, and guess what - because I could not make our
   Mapserver to cascade the service. You will find layer names like
   NameMaaperä
   1:20 000; 1:50 000/Name
  
   I would really much like to know also how the non-ascii characters
   should be handled in the mapfile when cascading such layers.
  
   -Jukka Rahkonen-
  
  
  
   Jeff McKenna wrote:
  
spaces are encoded as plus symbol in query part of URL
   
I agree it's a change that should slip in now for 7.0, but I hope
those with later ArcServer versions can test it in the beta (or we
have one volunteer to let us use their Arc WMS instance for testing).
   
-jeff
   
   
   
On 2014-08-20 1:52 PM, Lime, Steve D (MNIT) wrote:
 Devs: Is this a change that we should make for 7.0? Seems
 reasonable but I'm not sure what the side effects might be.

 Steve

 *From:*Moen, Paul T. [mailto:pm...@nd.gov]
 *Sent:* Wednesday, August 20, 2014 9:44 AM
 *To:* Lime, Steve D (MNIT); mapserver-users

Re: [mapserver-users] Postgis Tile Index

2014-08-20 Thread Rahkonen Jukka (Tike)
Perhaps it is something like this (from 
http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html)

“Reading raster data from the database
If you want to use the GDAL WKT Raster driver, you must provide a connection 
string as Dataset's name. The syntax of this connection string is (the quotes 
may be ommitted):
PG:host='host' port:'port' dbname='dbname' user='user' 
password='password' [schema='schema'] [table='raster_table'] 
[where='sql_where'] [mode='working_mode']

I would test first by using the string for one image as  DATA of your raster 
layer before to continue towards TILEINDEX+TILEITEM.

-Jukka Rahkonen-

Dave Barter wrote:

I’ve figured this out,

CREATE MATERIALIZED VIEW mapping_os_opendata_raster.streetview_tileindex AS 
SELECT rid as location, ST_ConvexHull(rast) as shape from 
mapping_os_opendata_raster.streetview



“location needs to be a path to the database/table/raster currently it is just 
returning an ID, but I cannot find any documentation as to how to construct 
this for postgres
So nearly there?


On 20 August 2014 at 11:34:03, Dave Barter 
(dave.bar...@gmail.commailto:dave.bar...@gmail.com) wrote:
Final question. How should my map file look in order to get the raster tile 
from the database not the file system?

LAYER
# CREATE MATERIALIZED VIEW 
mapping_os_opendata_raster.streetview_tileindex AS SELECT rid as location, 
ST_ConvexHull(rast) as shape from mapping_os_opendata_raster.streetview
NAME streetview_tileindex
TYPE polygon
PROJECTION
init=epsg:27700
END
CONNECTIONTYPE postgis
CONNECTION “
DATA shape from (SELECT shape,location FROM 
mapping_os_opendata_raster.streetview_tileindex) AS FOO USING UNIQUE location 
using srid=27700

END

LAYER
#RASTER TILE LAYERS MUST RUN FROM A TILEINDEX
NAME streetview
TYPE RASTER
STATUS ON
TILEINDEX streetview_tileindex
TILEITEM location
OFFSITE 0 0 0
PROJECTION
init=epsg:27700
END
DEBUG 5
EXTENT 0 0 300 100

END

This is not working as the layer street view returns an error:-

msDrawMap(): Image handling error. Failed to draw layer named 'streetview'. 
msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing file 
'654016' for layer 'street view’.

I set SHAPEFILE “” at the top of the file, but am unclear as to how the 
streetview layer will retrieve the tile ?



--
Dave Barter

Web: http://www.phased.co.ukhttp://www.phased.co.uk/
Email:d...@phased.co.ukmailto:email%3ad...@phased.co.uk
Twitter:@Citizenfishy
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Postgis Raster Layer

2014-08-20 Thread Rahkonen Jukka (Tike)
I bet that 0 0 0 is interpreted as nodata for some reason.

-Jukka Rahkonen-


Lähettäjä: Dave Bartermailto:dave.bar...@gmail.com
Lähetetty: ‎20.‎8.‎2014 19:01
Vastaanottaja: 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Postgis Raster Layer

Further investigation in QGIS shows that it is pixel value 161 that is not 
displaying

gdalinfo tells me that  161: 0,0,0,255 for the raster

So, can I correct this in map server, and why is it not rendering it as black?

On 20 August 2014 at 16:12:06, Andrea Peri 
(aperi2...@gmail.commailto:aperi2...@gmail.com) wrote:

I guess iT is a resampling question.
My theory is that you dont see this issue with on polygon filled with solid 
color because the resample strategy find the same color in all the considered 
portion of polygon.
This is not true for  labels or lines.

If this theory is true, it should fail also with points and with other colors.
Not only black.

A.

Il 20/ago/2014 17:04 Dave Barter 
dave.bar...@gmail.commailto:dave.bar...@gmail.com ha scritto:
Yes, it appears to be related to the black colour

On 20 August 2014 at 16:03:15, Andrea Peri 
(aperi2...@gmail.commailto:aperi2...@gmail.com) wrote:

AFAIK
The same problem of the label is also on lines. See in your sample the 
boundaries of street.

A.

Il 20/ago/2014 16:53 Dave Barter 
dave.bar...@gmail.commailto:dave.bar...@gmail.com ha scritto:
One final question for today!

When I use mapserver wms to serve the raster tiles from the file system, they 
look fine. But doing it from the database gives me problems with the black 
labels as can be seen by the image at 
http://phased.co.uk/wp-content/uploads/Screen-Shot-2014-08-20-at-15.49.09.png

Is there a way I can fix this? The rasters in the database are fine and not 
corrupted, I’ve checked this by exporting and viewing one.

Dave

--


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

___
mapserver-users mailing list
mapserver-users@lists.osgeo.orgmailto: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] Multiline string error

2014-08-14 Thread Rahkonen Jukka (Tike)
Hi, 

I would put this into MAP level
CONFIG CPL_DEBUG ON
and then at layer level
DEBUG 5

-Jukka Rahkonen-

Ian Walberg wrote:
 
 Steve,
 
 We will add some debug to the OGR read later today or tomorrow.
 
 How do I turn on the maximum debug?
 
 Thanks
 
 Ian
 
 -Original Message-
 From: Ian Walberg
 Sent: Wednesday, August 13, 2014 3:20 PM
 To: 'Lime, Steve D (MNIT)'; mapserver-users@lists.osgeo.org; mapserver-
 d...@lists.osgeo.org
 Subject: RE: Multiline string error
 
 Steve,
 
 OGR connection to SQLITE DB.
 
 Regards
 
 Ian
 
 -Original Message-
 From: Lime, Steve D (MNIT) [mailto:steve.l...@state.mn.us]
 Sent: Wednesday, August 13, 2014 8:46 AM
 To: Ian Walberg; mapserver-users@lists.osgeo.org; mapserver-
 d...@lists.osgeo.org
 Subject: RE: Multiline string error
 
 How are you submitting the WKT to MapServer? Is it via MapScript, via inline
 features or some other mechanism?
 
 Steve
 
 -Original Message-
 From: mapserver-dev-boun...@lists.osgeo.org [mailto:mapserver-dev-
 boun...@lists.osgeo.org] On Behalf Of Ian Walberg
 Sent: Wednesday, August 13, 2014 10:01 AM
 To: mapserver-users@lists.osgeo.org; mapserver-...@lists.osgeo.org
 Subject: Re: [mapserver-dev] Multiline string error
 
 Devs,
 
 The MULTILINE string below gives the following in mapprimitive.c and then as
 the first shape has 0 points the msSmallMalloc fails as the size passed to it 
 is -8.
 
 [Wed Aug 13 07:55:10 2014].618971 Shape contains 2 parts.
 [Wed Aug 13 07:55:10 2014].618987   Part 0 contains 0 points.
 [Wed Aug 13 07:55:10 2014].619001   Part 1 contains 3 points.
 [Wed Aug 13 07:55:10 2014].619016   0: (882.383078, 511.333078)
 [Wed Aug 13 07:55:10 2014].619032   1: (825.909890, 260.048026)
 [Wed Aug 13 07:55:10 2014].619049   2: (882.383078, 511.333078)
 
 Any clues what we should look at next?
 
 This same source data file and layer work with older versions of mapserver 6.
 
 Thanks
 
 Ian
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] On Behalf Of Ian Walberg
 Sent: Monday, August 11, 2014 3:53 PM
 To: mapserver-users@lists.osgeo.org; mapserver-...@lists.osgeo.org
 Subject: [mapserver-users] Multiline string error
 
 Folks,
 
 With Mapserver 6.5-dev from git and GDAL 1.9.1 the line below either does not
 draw or causes mapserv to error and not render an image without an error
 message.
 
 MULTILINESTRING ((-110.220980 38.982832, -110.220887 38.982863, -
 110.221614 38.982708, -110.220980 38.982832),(-110.220980 38.982832, -
 110.220887 38.982863, -110.221614 38.982708, -110.220980 38.982832))
 
 Changing the final digit on either of the first or last lats/longs and it 
 draws ok!
 
 Any ideas?
 
 Thanks
 
 Ian
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 ___
 mapserver-dev mailing list
 mapserver-...@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-dev
 ___
 mapserver-dev mailing list
 mapserver-...@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-dev
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Multiline string error

2014-08-14 Thread Rahkonen Jukka (Tike)
Hi,

This was fun, I had never tried anything like this before.

Works for me on Windows with a week old Mapserver build from gisinternals. Big 
thanks for Tamas for the builds by the way.

-Jukka-

 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Puolesta Lime, Steve D (MNIT)
 Lähetetty: 14. elokuuta 2014 17:40
 Vastaanottaja: Ian Walberg; mapserver-users@lists.osgeo.org; mapserver-
 d...@lists.osgeo.org
 Aihe: Re: [mapserver-users] Multiline string error
 
 One quick thing to do would be to take OGR out of the mix. Just set up a 
 mapfile
 with the feature in question as a WKT inline feature. Something like:
 
 LAYER
   NAME 'badwkt'
   TYPE LINE
   STATUS DEFAULT
   FEATURE
 WKT ' MULTILINESTRING ((-110.220980 38.982832, -110.220887 38.982863, -
 110.221614 38.982708, -110.220980 38.982832),(-110.220980 38.982832, -
 110.220887 38.982863, -110.221614 38.982708, -110.220980 38.982832))'
   END
   CLASS
 STYLE COLOR 0 0 0 END
   END
 END
 
 Then try to draw... If this fails then it's a MapServer issue.
 
 Steve
 
 -Original Message-
 From: Ian Walberg [mailto:ian.walb...@airborne.aero]
 Sent: Wednesday, August 13, 2014 9:38 PM
 To: Lime, Steve D (MNIT); mapserver-users@lists.osgeo.org; mapserver-
 d...@lists.osgeo.org
 Subject: RE: Multiline string error
 
 Steve,
 
 Version 6.4.1 built on the same machine with the same settings does not have
 the issue.
 
 Regards
 
 Ian
 
 -Original Message-
 From: Ian Walberg
 Sent: Wednesday, August 13, 2014 3:43 PM
 To: 'Lime, Steve D (MNIT)'; 'mapserver-users@lists.osgeo.org'; 'mapserver-
 d...@lists.osgeo.org'
 Subject: RE: Multiline string error
 
 Steve,
 
 We will add some debug to the OGR read later today or tomorrow.
 
 How do I turn on the maximum debug?
 
 Thanks
 
 Ian
 
 -Original Message-
 From: Ian Walberg
 Sent: Wednesday, August 13, 2014 3:20 PM
 To: 'Lime, Steve D (MNIT)'; mapserver-users@lists.osgeo.org; mapserver-
 d...@lists.osgeo.org
 Subject: RE: Multiline string error
 
 Steve,
 
 OGR connection to SQLITE DB.
 
 Regards
 
 Ian
 
 -Original Message-
 From: Lime, Steve D (MNIT) [mailto:steve.l...@state.mn.us]
 Sent: Wednesday, August 13, 2014 8:46 AM
 To: Ian Walberg; mapserver-users@lists.osgeo.org; mapserver-
 d...@lists.osgeo.org
 Subject: RE: Multiline string error
 
 How are you submitting the WKT to MapServer? Is it via MapScript, via inline
 features or some other mechanism?
 
 Steve
 
 -Original Message-
 From: mapserver-dev-boun...@lists.osgeo.org [mailto:mapserver-dev-
 boun...@lists.osgeo.org] On Behalf Of Ian Walberg
 Sent: Wednesday, August 13, 2014 10:01 AM
 To: mapserver-users@lists.osgeo.org; mapserver-...@lists.osgeo.org
 Subject: Re: [mapserver-dev] Multiline string error
 
 Devs,
 
 The MULTILINE string below gives the following in mapprimitive.c and then as
 the first shape has 0 points the msSmallMalloc fails as the size passed to it 
 is -8.
 
 [Wed Aug 13 07:55:10 2014].618971 Shape contains 2 parts.
 [Wed Aug 13 07:55:10 2014].618987   Part 0 contains 0 points.
 [Wed Aug 13 07:55:10 2014].619001   Part 1 contains 3 points.
 [Wed Aug 13 07:55:10 2014].619016   0: (882.383078, 511.333078)
 [Wed Aug 13 07:55:10 2014].619032   1: (825.909890, 260.048026)
 [Wed Aug 13 07:55:10 2014].619049   2: (882.383078, 511.333078)
 
 Any clues what we should look at next?
 
 This same source data file and layer work with older versions of mapserver 6.
 
 Thanks
 
 Ian
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] On Behalf Of Ian Walberg
 Sent: Monday, August 11, 2014 3:53 PM
 To: mapserver-users@lists.osgeo.org; mapserver-...@lists.osgeo.org
 Subject: [mapserver-users] Multiline string error
 
 Folks,
 
 With Mapserver 6.5-dev from git and GDAL 1.9.1 the line below either does not
 draw or causes mapserv to error and not render an image without an error
 message.
 
 MULTILINESTRING ((-110.220980 38.982832, -110.220887 38.982863, -
 110.221614 38.982708, -110.220980 38.982832),(-110.220980 38.982832, -
 110.220887 38.982863, -110.221614 38.982708, -110.220980 38.982832))
 
 Changing the final digit on either of the first or last lats/longs and it 
 draws ok!
 
 Any ideas?
 
 Thanks
 
 Ian
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 ___
 mapserver-dev mailing list
 mapserver-...@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-dev
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list

Re: [mapserver-users] MapServer reference/demo mapfile and data

2014-08-13 Thread Rahkonen Jukka (Tike)
Hi,

I also like a bunch of small demos better than one massive that covers 
everything. OSM vectors are one alternative but there are only string 
attributes in OSM data. Also all that would  be created from the demo layers 
should be marked with Map data © OpenStreetMap contributors and mixing with 
own data could make also the own data as ODbL licenced in some circumstances if 
the mix is presented for public. Personally I would prefer data who are in 
public domain.

I would like to still see the ”topp:states” from the Geoserver demos included 
so there would be one dataset that could be used for comparing  Mapserver and 
Geoserver.

http://demo.opengeo.org/geoserver/wms?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=505HEIGHT=346LAYERS=topp%3AstatesTRANSPARENT=TRUEFORMAT=image%2FpngBBOX=-125,16,-64,58SRS=EPSG:4326STYLES=

What is good is that the coverage of topp:states is big enough and it shows 
also in global BBOX
http://demo.opengeo.org/geoserver/wms?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=505HEIGHT=346LAYERS=topp%3AstatesTRANSPARENT=TRUEFORMAT=image%2FpngBBOX=-180,-90,180,90SRS=EPSG:4326STYLES=

As a somewhat experienced bug hunter I would pay rather lot attention to  
attributes. The topp:states does have many attributes to use for testing 
filters/expressions and styles but the schema is not rich at all, just strings 
and doubles

http://demo.opengeo.org/geoserver/wfs?SERVICE=WFSVERSION=1.0.0request=DescribeFeatureTypetypename=topp:states

For my own demo server I have created some simple datasets for points, 
multipoints, lines, multilines, polygons and multipolygons.
http://hip.latuviitta.org/cgi-bin/tinyows?service=wfsversion=1.0.0request=describefeaturetypetypename=lv:editable_multipolygons

All those layers have properties of type string, integer, double, date, and 
datatime. In addition they have one attribute which is a string but all the 
values are plain numbers and some of those with leading zeroes. Perhaps the 
layers could contain also some other common traps:
- tricky but still standard compliant attribute names
- non-ascii chararters in layer names and data – anybody tried to write OGC 
filters of http URLs for such beasts?
- lower and upper case characters in data – do you believe that case 
sensitive/insensitive filters always work as supposed?
- something that exceeds the limits of shapefiles: more than 10 characters in 
column names, longer the 255 character strings

The developers could do some brainstorming as well: what kind of questions and 
bug reports you would like to receive from Mapserver users and how to support 
that goal with the demo datasets. What is important is that it should be very 
easy for users and developers to use the same data and same layers should be 
possible to access also from live services. See for example this Geoserver 
issue https://jira.codehaus.org/browse/GEOS-6604?

The bit tricky vendor options which I was testing with local service can be 
tested also online with
http://demo.opengeo.org/geoserver/wms?BBOX=44.3115939344240175,-103.93616932504362182,44.55018319949628136,-103.57561215835877988CRS=EPSG:4326QUERY_LAYERS=topp:states,og:streamsSERVICE=WMSHEIGHT=714REQUEST=GetFeatureInfoSTYLES=I=775J=246WIDTH=1079FEATURE_COUNT=10VERSION=1.3.0FORMAT=image/pngLAYERS=topp:states,og:streamspropertyName=%28STATE_NAME%29%28cat%29

-Jukka Rahkonen-

Lime, Steve D wrote:

I think an updated demo is long overdue, something that could be branched at 
the same rate as the source itself. We have the basemap work that Thomas did 
but it’s probably too complex for the new user. Personally I’ve always been 
drawn to the OpenLayers approach with very targeted demos and code snippets 
that showcase functionality. I think the same could be done for MapServer. 
Simple examples like configuring a OGR layer, projecting a layer or drawing 
specialized symbology would seem very useful. Users could combine the 
techniques necessary to address more complex needs.

In terms of data the Itasca datasets would be fine as one source but the demo 
itself is very dated and doesn’t show off a typical use of the software any 
more. I’m ambivalent about leveraging outside datasets although doing so might 
make comparisons easier. Using OSM vectors might be a good option. Although 
with simple examples the data are not so important in most cases.

Maybe we start a mapserver.demo repo on github?

Steve

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka 
(Tike)
Sent: Wednesday, August 06, 2014 9:13 AM
To: 'MapserverList OSGEO'
Subject: Re: [mapserver-users] MapServer reference/demo mapfile and data

Hi,

Great idea. How about trying to show that the “OSGeo umbrella” could mean 
something real? Geoserver has a set of vectors and rasters in the “data_dir” 
directory of the standard delivery and I believe that the IP rights of those 
have been checked. Deegree has

Re: [mapserver-users] GetFeatureInfo error with native vector tileindex

2014-08-12 Thread Rahkonen Jukka (Tike)
Even Rouault wrote:

 Le lundi 11 août 2014 15:13:47, Rahkonen Jukka (Tike) a écrit :
  Hi,
 
  I have something like 1 shapefiles which I have combined to one
  layer with a tileindex shapefile which is created with ogrtindex
  utility. I can make WMS to render the layer fine both with the native
  Mapserver tileindex connection and by reading the tileindex with OGR
  by using CONNECTIONTYPE OGR.  However, GetFeatureInfo works well only
  with OGR connection to tileindex. The native tileindex throws
  occasionally this error (record number varies, naturally).
 
  msDBFReadAttribute(): DBASE file error. Invalid record number 231855.
 
 Is the error always the same or changing for the exact same GetFeatureInfo
 request ?
 Are you able to determine which shape is at that location and find how many
 records are there in the .DBF ? (what ogrinfo should report) That error is
 returned when :
 if( hEntity  0 || hEntity = psDBF-nRecords ) So it would mean that there 
 is an
 attempt of reading more records than there are actually. Which could happen if
 the DBF would be truncated. But I'm not clear why you wouldn't see the error
 through OGR.
 Difficult to know without being able to reproduce...


Hi,

At least I can reproduce something odd now with a minimal setup which I can 
share.
 
I use a trimmed MS4W version with fresh Mapserver 6.5-dev binaries from 
gisinternals.

The test package is in http://latuviitta.org/downloads/vectortileindex_map.zip
The package contains:
- mapfile in \apps
- one shapefile in \apps\data
- ogrtindex index shap in \apps
- GetFeatureInfo templates for text/html output in \apps\templates

Mapfile has section:
 CONNECTIONTYPE OGR
 TILEINDEX c:\ms4w\apps\debug.shp
 TILEITEM location

When tileindex is read like this through OGR GetFeatureInfo works but not if 
CONNECTIONTYPE OGR is commented out. Rendering works fine with both settings.

Here is a request to test with. It should find data as
KALTEVUUS   ALA NOPEUS  EROOSIO
0.400.6316.00   0

http://localhost:8060/cgi-bin/mapserv.exe?map=/ms4w/apps/vectortileindex.mapSERVICE=WMSVERSION=1.3.0REQUEST=GetFeatureInfoBBOX=322114.29698474460747093,6747927.06825653277337551,322258.16823926079086959,6748042.80528055597096682CRS=EPSG:3067WIDTH=1079HEIGHT=868LAYERS=SMK_uoma-analyysi_alaSTYLES=FORMAT=image/pngQUERY_LAYERS=SMK_uoma-analyysi_alaINFO_FORMAT=text/htmlI=813J=483FEATURE_COUNT=10
 
With DEBUG 5 and when having a correctly working OGR connection into tileindex 
I get all this into MS_ERRORFILE after successful GetFeatureInfo

[Tue Aug 12 14:11:33 2014].119000 msOGRFileOpen(c:\ms4w\apps\debug.shp)...
[Tue Aug 12 14:11:33 2014].119000 OGROPen(c:\ms4w\apps\debug.shp)
[Tue Aug 12 14:11:33 2014].119000 
msConnPoolRegister(SMK_uoma-analyysi_ala,(null),019956E0)
[Tue Aug 12 14:11:33 2014].119000 
msOGRFileOpen(c:/ms4w/apps/data/vesiensuojelu_teema_ii.shp,0)...
[Tue Aug 12 14:11:33 2014].119000 
OGROPen(c:/ms4w/apps/data/vesiensuojelu_teema_ii.shp)
[Tue Aug 12 14:11:33 2014].119000 
msConnPoolRegister(SMK_uoma-analyysi_ala,(null),019C3638)
[Tue Aug 12 14:11:33 2014].119000 msOGRFileWhichShapes: Setting spatial filter 
to 3322545.770087 6750733.636809 3322548.437923 6750736.304646
[Tue Aug 12 14:11:33 2014].119000 
msOGRFileClose(c:/ms4w/apps/data/vesiensuojelu_teema_ii.shp,0).
[Tue Aug 12 14:11:33 2014].119000 
msConnPoolRelease(SMK_uoma-analyysi_ala,(null),019C3638)
[Tue Aug 12 14:11:33 2014].119000 
msOGRFileOpen(c:/ms4w/apps/data/vesiensuojelu_teema_ii.shp,0)...
[Tue Aug 12 14:11:33 2014].119000 
OGROPen(c:/ms4w/apps/data/vesiensuojelu_teema_ii.shp)
[Tue Aug 12 14:11:33 2014].129000 
msConnPoolRegister(SMK_uoma-analyysi_ala,(null),019CACC0)
[Tue Aug 12 14:11:33 2014].129000 msOGRFileWhichShapes: Setting spatial filter 
to 3322545.770087 6750733.636809 3322548.437923 6750736.304646
[Tue Aug 12 14:11:33 2014].129000 msOGRFileNextShape: Returning shape=130023, 
tile=0
[Tue Aug 12 14:11:33 2014].129000 msOGRFileNextShape: Returning MS_DONE (no 
more shapes)
[Tue Aug 12 14:11:33 2014].129000 
msOGRFileClose(c:/ms4w/apps/data/vesiensuojelu_teema_ii.shp,0).
[Tue Aug 12 14:11:33 2014].129000 
msConnPoolRelease(SMK_uoma-analyysi_ala,(null),019CACC0)
[Tue Aug 12 14:11:33 2014].129000 
msOGRFileOpen(c:/ms4w/apps/data/vesiensuojelu_teema_ii.shp,0)...
[Tue Aug 12 14:11:33 2014].129000 
OGROPen(c:/ms4w/apps/data/vesiensuojelu_teema_ii.shp)
[Tue Aug 12 14:11:33 2014].139000 
msConnPoolRegister(SMK_uoma-analyysi_ala,(null),019CADA0)
[Tue Aug 12 14:11:33 2014].139000 msOGRFileWhichShapes: Setting spatial filter 
to 3322545.770087 6750733.636809 3322548.437923 6750736.304646
[Tue Aug 12 14:11:33 2014].139000 freeLayer(): freeing layer at 0198D638.
[Tue Aug 12 14:11:33 2014].139000 msOGRLayerClose((null)).
[Tue Aug 12 14:11:33 2014].139000 msOGRFileClose(c:\ms4w\apps\debug.shp,0).
[Tue Aug 12 14:11:33 2014].139000 
msConnPoolRelease(SMK_uoma-analyysi_ala,(null),019956E0)
[Tue Aug 12 14:11:33 2014].139000

[mapserver-users] GetFeatureInfo error with native vector tileindex

2014-08-11 Thread Rahkonen Jukka (Tike)
Hi,

I have something like 1 shapefiles which I have combined to one layer with 
a tileindex shapefile which is created with ogrtindex utility. I can make WMS 
to render the layer fine both with the native Mapserver tileindex connection 
and by reading the tileindex with OGR by using CONNECTIONTYPE OGR.  However, 
GetFeatureInfo works well only with OGR connection to tileindex. The native 
tileindex throws occasionally this error (record number varies, naturally).

msDBFReadAttribute(): DBASE file error. Invalid record number 231855.

Have anybody else experienced something similar? I know that all the shapefiles 
in the data directory are a bit faulty because they are written with an old 
shapelib version, see GDAL ticket http://trac.osgeo.org/gdal/ticket/5608. 
However, Mapserver in this case gives an error from msDBFReadAttribute() and I 
do not know if it can have to do with the content length field of the .shx 
file. Another detail is that the shapefiles in my data directory do not overlap 
but the bounding boxes stored into the vector tileindex file do overlap. I also 
tried to make a small sample for demonstrating the issue but unfortunately 
Mapserver works correctly with this dataset both through the native and OGR 
tileindexes.

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


Re: [mapserver-users] MapServer for Windows

2014-08-05 Thread Rahkonen Jukka (Tike)
Hi,

The ”relevant binaries” means copying into the cgi-bin directory of MS4W all 
the .dll files from \release-1600-gdal-mapserver.zip\bin\ as well as 
mapserv.exe from \release-1600-gdal-mapserver.zip\bin\ms\apps\.  I believe that 
32-bit binaries must be used.

I made a short test with my old MS4W installation and Apache did start and all 
the old mapfiles I tried were working after these substitutions. However, from 
previous experience I know that mixed binaries can make troubles. I also 
believe that Mapserver is losing users because we lack an easy way to install 
current version on Windows.

-Jukka Rahkonen-



Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Tamas Szekeres
Lähetetty: 5. elokuuta 2014 13:47
Vastaanottaja: Ben Crane
Kopio: MapserverList OSGEO
Aihe: Re: [mapserver-users] MapServer for Windows

If you still using ms4w+Apache, try replacing the relevant binaries from 
release-1600 builds from http://www.gisinternals.com/sdk/ which should be a 
compatible build well enough, though PHP is not being compiled at the moment. 
You can also download an IIS based msi installer with CGI registration 
capabilities (not fastCGI) from http://www.gisinternals.com/sdk/.

Best regards,

Tamas



2014-08-05 11:36 GMT+02:00 Ben Crane 
curtly.b...@gmail.commailto:curtly.b...@gmail.com:
Hey all,
Mapserver for Windows :)
I've seen a bit about this online but sometimes more information can be more 
confusing. I've used MS4W before and loved it but I have noticed the versions 
are getting far removed from the latest build and that concerns me. I would 
like to install MapServer (including the admin webpage (which made life a lot 
easier)) but the latest version - apparently there has been a fix to the 
PolygonSymbolizer stroke-opacity not working within Mapserver that I'd like to 
try out. I will be primarily using it to build a WMS service.
Can anyone suggest from personal experience which his the best route to go to 
get the latest Mapserver (including upgrades/new builds, etc) for Windows?

Cheers,
Ben

___
mapserver-users mailing list
mapserver-users@lists.osgeo.orgmailto: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] invalid location of WFS-transaaction.xsd

2014-08-03 Thread Rahkonen Jukka (Tike)
Hi,

I would read http://mapserver.org/tinyows/configfile.html and then try to edit 
the tinyows.xml file from 

tinyows online_resource=http://127.0.0.1/cgi-bin/tinyows;
 schema_dir=/usr/local/tinyows/schema/

-Jukka Rahkonen-



Jachym Cepicky wrote:

 Hi,

 having a look into apache/log/error.log, I see strange warning

 AH01215: I/O warning : failed to load external entity
/usr/local/tinyows/schema/wfs/1.0.0/WFS-transaction.xsd


And yes: the file is located in
/usr/share/tinyows/schema/wfs/1.0.0/WFS-transaction.xsd

What can I do about it?

Thanks

Jachym

--
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp

Give your code freedom with PyWPS - http://pywps.wald.intevation.org
___
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] creating new feature via tinyows and WFS-T

2014-08-03 Thread Rahkonen Jukka (Tike)
I wonder if it is OK to have two feature elements nested in Insert.

-Jukka Rahkonen-

Lähettäjä: Jachym Cepickymailto:jachym.cepi...@gmail.com
Lähetetty: ‎3.‎8.‎2014 16:24
Vastaanottaja: 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] creating new feature via tinyows and WFS-T

Hi,

I would like to create new feature (using OpenLayers 2, WFS-T) client,
but tinyows is refusing:

The request can be seen at http://pastebin.com/eaXSjfgd

The response is

 ows:Exception exceptionCode='MissingParameterValue' locator='request'
  ows:ExceptionTextQUERY_STRING contains forbidden
characters/ows:ExceptionText
 /ows:Exception


Any hint, what could possible go wrong?

Maybe missing attributes? I'm dealing just with geometry, but still ...

Thanks

Jachym

--
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp

Give your code freedom with PyWPS - http://pywps.wald.intevation.org
___
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] creating new feature via tinyows and WFS-T

2014-08-03 Thread Rahkonen Jukka (Tike)
Hi,

For comparison, here is a full successful request which is created by Kosmo GIS 
(for my mind the best open source GIS client for WFS that exists).

POST /cgi-bin/tinyows HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.0-beta1
Host: hip.latuviitta.org
Connection: Keep-Alive
Content-Length: 956
Content-Type: text/xml; charset=utf-8

?xml version='1.0' encoding='UTF-8'?wfs:Transaction version=1.0.0 
service=WFS xmlns:lv=http://latuviitta.fi/; 
xmlns:gml=http://www.opengis.net/gml; xmlns:ogc=http://www.opengis.net/ogc; 
xmlns:wfs=http://www.opengis.net/wfs; 
xmlns:xlink=http://www.w3.org/1999/xlink; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd 
http://hip.latuviitta.org/cgi-bin/tinyows?SERVICE=WFSamp;REQUEST=DescribeFeatureTypeamp;version=1.0.0amp;TYPENAME=lv:editable_pointsamp;NAMESPACE=xmlns(lv=http://latuviitta.fi/)
 http://latuviitta.fi/;wfs:Insert handle=insert1 
idgen=GenerateNewlv:editable_points 
xmlns:lv=http://latuviitta.fi/;lv:geomgml:Point 
xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:3067  
gml:coordinates247061.006,7090329.492 
/gml:coordinates/gml:Point/lv:geom/lv:editable_points/wfs:Insert/wfs:Transaction

-Jukka Rahkonen-

Lähettäjä: Jachym Cepicky [jachym.cepi...@gmail.com]
Lähetetty: 3. elokuuta 2014 18:15
Vastaanottaja: Rahkonen Jukka  (Tike)
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] creating new feature via tinyows and WFS-T

IMHO, it's ok (at first sight): feature: is namespace (refering to
http://tinyows.org/),  the first element is refering to layer name
(stavebniobjekty), the second one to attribute which holds the
geometry (aka originalnihranice)

j

2014-08-03 16:37 GMT+02:00 Rahkonen Jukka  (Tike) jukka.rahko...@mmmtike.fi:
 I wonder if it is OK to have two feature elements nested in Insert.

 -Jukka Rahkonen-
 
 Lähettäjä: Jachym Cepicky
 Lähetetty: 3.8.2014 16:24
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] creating new feature via tinyows and WFS-T

 Hi,

 I would like to create new feature (using OpenLayers 2, WFS-T) client,
 but tinyows is refusing:

 The request can be seen at http://pastebin.com/eaXSjfgd

 The response is

  ows:Exception exceptionCode='MissingParameterValue' locator='request'
   ows:ExceptionTextQUERY_STRING contains forbidden
 characters/ows:ExceptionText
  /ows:Exception


 Any hint, what could possible go wrong?

 Maybe missing attributes? I'm dealing just with geometry, but still ...

 Thanks

 Jachym

 --
 Jachym Cepicky
 e-mail: jachym.cepicky gmail com
 URL: http://les-ejk.cz
 GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp

 Give your code freedom with PyWPS - http://pywps.wald.intevation.org
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users



--
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp

Give your code freedom with PyWPS - http://pywps.wald.intevation.org
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Problems with getting geojson running as WFS response

2014-07-26 Thread Rahkonen Jukka (Tike)
Hi,

I would say that if your service is advertising geojson as a supported WFS 
outputformat in GetCapabilities it should also support all standard WFS 
requests and parameters and MaxFeatures is such an important parameter that at 
least that should work for all outputformats. I suggest you to file a bug into 
github https://github.com/mapserver. The developers woud like to get also a 
repeatable test case with a small shapefile and mapfile.

-Jukka Rahkonen-

Jacob Mendt wrote:

Hi List,

i did some further testing and meet some unexpecting behavior. If I doesn’t use 
“MAXFEATURES” in my WFS-Request I get back a GeoJSON Response. Is that wanted 
behavior or do I miss something?

Kind regards,

JM

Von: Jacob Mendt [mailto:jacobme...@googlemail.com]
Gesendet: Dienstag, 22. Juli 2014 09:51
An: 'Rahkonen Jukka (Tike)'; mapserver-users@lists.osgeo.org
Betreff: AW: [mapserver-users] Problems with getting geojson running as WFS 
response

Hi Jukka,

yes i tried this. But the behavior stays the same.

JM

Von: Rahkonen Jukka (Tike) [mailto:jukka.rahko...@mmmtike.fi]
Gesendet: Dienstag, 22. Juli 2014 09:30
An: Jacob Mendt; 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] Problems with getting geojson running as WFS 
response

Hi,

Have you tried to request geojson with its MIMETYPE as 
format=application/json; subtype=geojson ?

-Jukka Rahkonen-

Jacob Mendt wrote:
 Hey List,

 i am right now trying to bring get my Mapserver (Version 6.0.0) WFS running 
 with GeoJSON. But I always get back an empty response. I tried several 
 approaches and my WFS runs with a GML response. So maybe somebody could give 
 me hint. Here is my mapfile:

MAP
…
PROJECTION
init=epsg:4314
END
EXTENT 5.8301544189 47.207629395 23.019073486 56

…
#  OUTPUTFORMAT
#NAME geojson
#DRIVER OGR/GEOJSON
#MIMETYPE application/json; subtype=geojson
#FORMATOPTION STORAGE=stream
#FORMATOPTION FORM=SIMPLE
#  END

OUTPUTFORMAT
  NAME geojson
  DRIVER TEMPLATE
  FORMATOPTION FILE=/home/test/messtischblatt.js
  MIMETYPE application/json; subtype=geojson
END

WEB
METADATA
wfs_srs epsg:900913 epsg:4314 EPSG:3857 EPSG:4326 EPSG:3978
wfs_getfeature_formatlist geojson
END
END # WEB



  # geojson layer
  LAYER
TEMPLATE messtischblatt.js
STATUS ON
NAME test
TYPE POLYGON
EXTENT 649304.652862922 6090078.57976033 2559975.30438738 7538210.86255982

DATA boundingbox from (SELECT * FROM layer ORDER BY titel, time) as foo 
using unique id using srid=900913
CONNECTIONTYPE postgis
CONNECTION dbname=*** user=***  password=*** host=*** 

#DATA messtischblatt
#CONNECTIONTYPE OGR
#CONNECTION PG: dbname=*** user=*** password=*** host=***

PROJECTION
init=epsg:900913
END
METADATA
wfs_title Test WFS
wfs_srs EPSG:4326 EPSG:4314 EPSG:900913 
wfs_enable_request *
wfs_getfeature_formatlist geojson
END
  END

END # MAP#  Tile Index

I test it with a couple of approaches. It tried both Outputformats and both 
ways of defining a postgis data source. But in any case I get back an empty 
response. With the template approach I used the following template:

[resultset layer=test]
{
“type”: “FeatureCollection”,
“features”: [
   [feature trimlast=”,”]
   {
   “type”: “Feature”,
   “id”: “[id]”,
   …
   }
   [/feature]
]
}
[/resultset]

I run my mapserver also with DEBUG level 5. I got the following log output:

[Mon Jul 21 18:10:21 2014].528584 msFreeMap(): freeing map at 0x19447b0.
[Mon Jul 21 18:10:22 2014].387718 CGI Request 1 on process 4362
[Mon Jul 21 18:10:22 2014].521952 mapserv request processing time (msLoadMap 
not incl.): 0.134s

My test request is:

http://localhost/cgi-bin/mtbows?map=./test.mapSERVICE=WFSVERSION=1.0.0REQUEST=getfeatureTYPENAME=testMAXFEATURES=100srsname=EPSG:900913bbox=1518929.826549386,6766016.954331277,2693002.5808462612,7384239.639015725outputformat=geojson

Could somebody give me an advice?

Kind regards,

JM

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

Re: [mapserver-users] Problems with getting geojson running as WFS response

2014-07-22 Thread Rahkonen Jukka (Tike)
Hi,

Have you tried to request geojson with its MIMETYPE as 
format=application/json; subtype=geojson ?

-Jukka Rahkonen-


Jacob Mendt wrote:

 Hey List,

 i am right now trying to bring get my Mapserver (Version 6.0.0) WFS running 
 with GeoJSON. But I always get back an empty response. I tried several 
 approaches and my WFS runs with a GML response. So maybe somebody could give 
 me hint. Here is my mapfile:

MAP
…
PROJECTION
init=epsg:4314
END
EXTENT 5.8301544189 47.207629395 23.019073486 56

…
#  OUTPUTFORMAT
#NAME geojson
#DRIVER OGR/GEOJSON
#MIMETYPE application/json; subtype=geojson
#FORMATOPTION STORAGE=stream
#FORMATOPTION FORM=SIMPLE
#  END

OUTPUTFORMAT
  NAME geojson
  DRIVER TEMPLATE
  FORMATOPTION FILE=/home/test/messtischblatt.js
  MIMETYPE application/json; subtype=geojson
END

WEB
METADATA
wfs_srs epsg:900913 epsg:4314 EPSG:3857 EPSG:4326 EPSG:3978
wfs_getfeature_formatlist geojson
END
END # WEB



  # geojson layer
  LAYER
TEMPLATE messtischblatt.js
STATUS ON
NAME test
TYPE POLYGON
EXTENT 649304.652862922 6090078.57976033 2559975.30438738 7538210.86255982

DATA boundingbox from (SELECT * FROM layer ORDER BY titel, time) as foo 
using unique id using srid=900913
CONNECTIONTYPE postgis
CONNECTION dbname=*** user=***  password=*** host=*** 

#DATA messtischblatt
#CONNECTIONTYPE OGR
#CONNECTION PG: dbname=*** user=*** password=*** host=***

PROJECTION
init=epsg:900913
END
METADATA
wfs_title Test WFS
wfs_srs EPSG:4326 EPSG:4314 EPSG:900913 
wfs_enable_request *
wfs_getfeature_formatlist geojson
END
  END

END # MAP#  Tile Index

I test it with a couple of approaches. It tried both Outputformats and both 
ways of defining a postgis data source. But in any case I get back an empty 
response. With the template approach I used the following template:

[resultset layer=test]
{
“type”: “FeatureCollection”,
“features”: [
   [feature trimlast=”,”]
   {
   “type”: “Feature”,
   “id”: “[id]”,
   …
   }
   [/feature]
]
}
[/resultset]

I run my mapserver also with DEBUG level 5. I got the following log output:

[Mon Jul 21 18:10:21 2014].528584 msFreeMap(): freeing map at 0x19447b0.
[Mon Jul 21 18:10:22 2014].387718 CGI Request 1 on process 4362
[Mon Jul 21 18:10:22 2014].521952 mapserv request processing time (msLoadMap 
not incl.): 0.134s

My test request is:

http://localhost/cgi-bin/mtbows?map=./test.mapSERVICE=WFSVERSION=1.0.0REQUEST=getfeatureTYPENAME=testMAXFEATURES=100srsname=EPSG:900913bbox=1518929.826549386,6766016.954331277,2693002.5808462612,7384239.639015725outputformat=geojson

Could somebody give me an advice?

Kind regards,

JM

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

Re: [mapserver-users] can't compile TinyOWS

2014-07-22 Thread Rahkonen Jukka (Tike)
Hi,

I have just compiled TinyOWS on Ubuntu 14.04 and had to install flex, 
libxml2-dev and libpq-dev for making it success.

-Jukka Rahkonen-

Lime, Steve D (MNIT) wrote:

 I think it’s looking for flex. Is it installed?

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Richard Greenwood
Sent: Tuesday, July 22, 2014 8:33 AM
To: mapserver
Subject: [mapserver-users] can't compile TinyOWS

I'm not smart enough to fix the compile error that I'm getting below. Any ideas?

$ make
gcc -o tinyows src/fe/fe_comparison_ops.c src/fe/fe_error.c src/fe/fe_filter.c 
src/fe/fe_filter_capabilities.c src/fe/fe_function.c src/fe/fe_logical_ops.c 
src/fe/fe_spatial_ops.c src/mapfile/mapfile.c src/ows/ows_bbox.c src/ows/ows.c 
src/ows/ows_config.c src/ows/ows_error.c src/ows/ows_geobbox.c 
src/ows/ows_get_capabilities.c src/ows/ows_layer.c src/ows/ows_metadata.c 
src/ows/ows_psql.c src/ows/ows_request.c src/ows/ows_srs.c 
src/ows/ows_storage.c src/ows/ows_version.c src/struct/alist.c 
src/struct/array.c src/struct/buffer.c src/struct/cgi_request.c 
src/struct/list.c src/struct/mlist.c src/struct/regexp.c src/wfs/wfs_describe.c 
src/wfs/wfs_error.c src/wfs/wfs_get_capabilities.c src/wfs/wfs_get_feature.c 
src/wfs/wfs_request.c src/wfs/wfs_transaction.c src/ows/ows_libxml.c 
-I/usr/include/libxml2 -lxml2 -lz -lm -ldl -g -O2 -std=c99 -pedantic -Wall 
-I/usr/pgsql-9.2/include -L/usr/pgsql-9.2/lib -lpq   -lfcgi  -lfl
/usr/bin/ld: cannot find -lfl
collect2: ld returned 1 exit status
make: *** [all] Error 1

Thanks,
Rich

--
Richard W. Greenwood, PLS
www.greenwoodmap.comhttp://www.greenwoodmap.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Dynamic GEOMTRANSFORM based on map scale

2014-07-22 Thread Rahkonen Jukka (Tike)
Hi,

For my mind WFS delivers vector data who do not really have any scale but you 
may have some idea about how you define the scale. Perhaps like Send me 
vectors for the same area than my raster background map which comes from WMS 
and has a scale of 1:x. However, I do not believe that WFS server can compute 
anything like scale from the standard WFS GetFeature parameters because 
equivalent to raster pixel size is missing.

Have you considered to use variable substitution by reading the data from 
PostGIS or Spatialite, defining DATA as select 
ST_Simplify(geometry,%tolerance%) as geometry,... and make your application to 
send the tolerance variable with GetFeature requests? Make it to compute the 
tolerance by for example the width of BBOX if you use it in your GetFeatures.

-Jukka Rahkonen-


Tom wrote:

Hi folks,

I’m trying to implement a kind of ‘feature generalization’ so that the feature 
data in my WFS responses will be appropriate to the map zoom level.  I see two 
basic techniques I could use to do this:


1)  Use different shapefiles at different zoom levels

2)  Use GEOMTRANSFORM somehow

Of these two, GEOMTRANSFORM seems like the least hassle.  However, I can’t seem 
to figure out a way to factor in my map’s scale into the amount of shape 
simplification.  When I’m zoomed out, the shapes should be simplified a lot.  
When I’m zoomed the whole way in, I should be using finer detail.  Is there a 
variable I can use in this expression? GEOMTRANSFORM (simplifypt([shape], 
[map_cellsize] * 10))

[map_scale] would be nice, if it existed.



Thanks,

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

Re: [mapserver-users] TinyOWS: Axis order fix wanted

2014-07-03 Thread Rahkonen Jukka (Tike)
Olivier Courtin wrote:
 
 On Sat, Jun 28, 2014 at 11:38 PM, Even Rouault even.rouault@mines-
 paris.org wrote:
 
 
  The following pull request should fix Jukka's issue :
 
  https://github.com/mapserver/tinyows/pull/65
 
 I've just commited the pull request.
 Thanks for this one Even,
 
 
 Jukka could you check on your own that everything is fine for you ?

With pleasure but I need some help. I need detailed instructions for how to 
compile the version from github with Ubuntu 14.04. I think that the same 
instructions could  be included also in the TinyOWS documentation.

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


Re: [mapserver-users] Can't get mapcache/mapserver to properly display a map.

2014-06-30 Thread Rahkonen Jukka (Tike)
Hi,

Totally normal. That is how WMS is planned to work. Clien asks first Hi there, 
server! Show me what you can! and server answers. You will find plenty of good 
reading about WMS from the web including Mapserver documentation 
http://mapserver.org/ogc/wms_server.html. First hit for WMS + GetCapabilities 
for me was 
http://webhelp.esri.com/arcims/9.2/general/mergedProjects/wms_connect/wms_connector/get_capabilities.htm
 which was very informative as well.

-Jukka Rahkonen-

TrolliPolli wrote:

 I have installed mapcache and mapserver.  I can navigate to the demo at
 localhost/mapcache/demo, but when I'm having difficulties doing much else.

 First question, when I navigate to
http://localhost:9282/mapcache/?MAP=/gisDirectory/htdocs/mapserver/mymap.mapSERVICE=WMSREQUEST=GetCapabilities

 I simply see the following xml file tree:
WMT_MS_Capabilities version=1.1.1
Service
NameOGC:WMS/Name
Titleno title set, add some in metadata/Title
OnlineResource xmlns:xlink=http://www.w3.org/1999/xlink;
xlink:href=http://localhost:9282/mapcache/?/
/Service
Capability
Request
GetCapabilities
Formatapplication/vnd.ogc.wms_xml/Format
DCPType
HTTP
Get
OnlineResource
xmlns:xlink=http://www.w3.org/1999/xlink;
xlink:href=http://localhost:9282/mapcache/?/
/Get
   /HTTP
   /DCPType
   /GetCapabilities
GetMap
Formatimage/png/Format
Formatimage/jpeg/Format
DCPType
 HTTP
Get
OnlineResource
xmlns:xlink=http://www.w3.org/1999/xlink;
xlink:href=http://localhost:9282/mapcache/?/
   /Get
/HTTP
/DCPType
/GetMap
GetFeatureInfo
Formattext/plain/Format
Formatapplication/vnd.ogc.gml/Format
DCPType
HTTP
Get
OnlineResource
xmlns:xlink=http://www.w3.org/1999/xlink;
xlink:href=http://localhost:9282/mapcache/?/
/Get
/HTTP
/DCPType
/GetFeatureInfo
/Request
Exceptions
Formattext/plain/Format
/Exceptions
VendorSpecificCapabilities
TileSet
SRSEPSG:900913/SRS
BoundingBox SRS=EPSG:900913 minx=-20037508.342789
miny=-20037508.342789 maxx=20037508.342789 maxy=20037508.342789/
Resolutions
   156543.03392804099712520838 78271.51696402048401068896
39135.75848201022745342925 19567.87924100512100267224
9783.93962050256050133612 4891.96981025128025066806
2445.98490512564012533403 1222.99245256282006266702 611.49622628141003133351
305.74811314070478829308 152.87405657035250783338 76.43702828517623970583
38.21851414258812695834 19.10925707129405992646 9.55462853564703173959
4.77731426782351586979 2.38865713391175793490 1.19432856695587897633
0.59716428347793950593
/Resolutions
Width256/Width
Height256/Height
Formatimage/png/Format
Layersosm/Layers
Styles/
/TileSet
/VendorSpecificCapabilities
Layer
Titleno title set, add some in metadata/Title
SRSEPSG:900913/SRS
SRSEPSG:4326/SRS
SRSEPSG:3857/SRS
Layer cascaded=1 queryable=0
Nameosm/Name
TitleOSM MapServer served map/Title
   Abstract
see
http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu
   /Abstract
LatLonBoundingBox minx=-180.00 miny=-90.00
maxx=180.00 maxy=90.00/
BoundingBox SRS=EPSG:900913 minx=-20037508.342789
miny=-20037508.342789 maxx=20037508.342789 maxy=20037508.342789/
SRSEPSG:900913/SRS
SRSEPSG:3857/SRS
BoundingBox SRS=EPSG:4326 minx=-180.00
miny=-90.00 maxx=180.00 maxy=90.00/
SRSEPSG:4326/SRS
/Layer
/Layer
/Capability



Is this normal? Or should I be actually seeing something more with a
GetCapabilities request?






--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Can-t-get-mapcache-mapserver-to-properly-display-a-map-tp5148847.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] OGR/GeoJSON WRITE_BBOX

2014-06-30 Thread Rahkonen Jukka (Tike)
Hi,

About how to test if it is an OGR issue, make a test with OGR. Capture some 
data for example from some Geoserver WFS and convert it into geojson with 
ogr2ogr

ogr2ogr -f geojson test.json -lco WRITE_BBOX=YES 
http://demo.opengeo.org/geoserver/wfs?service=wfsversion=1.0.0request=getfeaturetypename=og:archsitesoutputformat=application/json;

See the beginning of the result

{
type: FeatureCollection,
crs: { type: name, properties: { name: urn:ogc:def:crs:EPSG::26713 
} },
bbox: [ 589860.0, 4914479.0, 608355.0, 4926490.0 ],
features: [

Conclusion: ogr2ogr can do it. My version is GDAL 2.0-dev.

-Jukka Rahkonen-

Tom wrote:

Hi folks,

I’m trying to use OGR to output GeoJSON from my WFS service.  I’d like to 
include the BBOX (equivalent of gml:boundedBy) at the FeatureCollection level.  
From the documentation, it looks like I should be able to set it up this way:

OUTPUTFORMAT
  NAME GEOJSON
  DRIVER OGR/GeoJSON
  MIMETYPE application/json; subtype=geojson
  FORMATOPTION STORAGE=memory
  FORMATOPTION FORM=SIMPLE
FORMATOPTION LCO:WRITE_BBOX=YES
END

According to http://www.gdal.org/drv_geojson.html, WRITE_BBOX is exactly what I 
need.  According to the docs, it should create a bbox at the FeatureCollection 
and the Feature level.  For me, it generates a bbox for every feature, but not 
one for the top-level FeatureCollection, which OGR claims to support.

Does anyone have experience with this?  Any idea how I could determine if this 
would be a Mapserver issue, or an OGR issue?

Thanks,

Tom



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

Re: [mapserver-users] Can't get mapcache/mapserver to properly display a map.

2014-06-30 Thread Rahkonen Jukka (Tike)
Hi,

Your URL is wrong. Read this also 
http://www.mapserver.org/mapcache/install.html and follow the examples. If you 
find that documantation is poor or wrong, suggest how to improve it.

-Jukka Rahkonen-



 TrolliPolli wrote:

Thank you for the response!

In that case, how do I go about actually opening my map?

I've tried using the url:
http://localhost/mapcache/?map=/gisDirectory/osm-outlined,google,usshields.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=borders1STYLES=SRS=EPSG:4326%20BBOX=-2000,-2000,2000,2000WIDTH=800HEIGHT=800FORMAT=image/png

to open my map osm-outlined,google,usshields.map (note that I generated
this using the tutorial found  HERE
http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu  ) which has
many layers, one of which being named borders1.

This simply says The webpage is not available and in my error log file I
find:
received wms request with invalid layer borders1

I've tried using layers other than borders1, but I always get this error.

I can post the whole map file if this would help, but it is rather large as
I generated it for a large OSM map.





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Can-t-get-mapcache-mapserver-to-properly-display-a-map-tp5148847p5148852.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Can't get mapcache/mapserver to properly display a map.

2014-06-30 Thread Rahkonen Jukka (Tike)
Hi,

I sort of hate our Mapserver tutorials because they jump directly to some fancy 
advanced features which for sure look good when everything works but if not 
then the poor new users are left all alone.   In your case something has lead 
you to use ridiculous BBOX.  EPSG:4326 is using degrees as units and the world 
is between -90/+90 and -180/+180 degrees. Your BBOX, if it works, is a really 
big big world. I guess you want to use EPSG:3857 (900913). But there is the 
first problem that layer borders1 is somehow faulty and even with a good BBOX 
you will not see a map and you have no idea what is wrong. Also  
http://localhost/mapcache/?map; cannot be right. Check the URL where mapcache 
WMS service should be.


http://localhost/mapcache/?map=/gisDirectory/osm-outlined,google,usshields.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=borders1STYLES=SRS=EPSG:4326%20BBOX=-2000,-2000,2000,2000WIDTH=800HEIGHT=800FORMAT=image/png

I am sure that I can guide your through your troubles but unfortunately I am 
quite busy for the next few days. Meanwhile you can read Mapserver 
documentation about basic WMS use and perhaps set ut a simple layer from a 
shapefile. You can also read my own tutorial from 
http://latuviitta.org/documents/Super_easy_WMS_server.pdf. It is quite old and 
I have not tested lately if it is still valid.

-Jukka Rahkonen-



Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] k#228;ytt#228;j#228;n TrolliPolli 
[aon...@lgsinnovations.com] puolesta
Lähetetty: 30. kesäkuuta 2014 19:53
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Can't get mapcache/mapserver to properlydisplay 
a map.

Thank you for the response!

In that case, how do I go about actually opening my map?

I've tried using the url:
http://localhost/mapcache/?map=/gisDirectory/osm-outlined,google,usshields.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=borders1STYLES=SRS=EPSG:4326%20BBOX=-2000,-2000,2000,2000WIDTH=800HEIGHT=800FORMAT=image/png

to open my map osm-outlined,google,usshields.map (note that I generated
this using the tutorial found  HERE
http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu  ) which has
many layers, one of which being named borders1.

This simply says The webpage is not available and in my error log file I
find:
received wms request with invalid layer borders1

I've tried using layers other than borders1, but I always get this error.

I can post the whole map file if this would help, but it is rather large as
I generated it for a large OSM map.





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Can-t-get-mapcache-mapserver-to-properly-display-a-map-tp5148847p5148852.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] OGR/GeoJSON WRITE_BBOX

2014-06-30 Thread Rahkonen Jukka (Tike)
Hi,

Perhaps it is your GDAL version that does not write the BBOX for the 
collection? This gets GML from Mapserver WFS and converts it into geojson

ogr2ogr -f geojson test_ms.json -lco WRITE_BBOX=YES 
http://hip.latuviitta.org/cgi-bin/mapserver_wfs?service=wfsversion=1.0.0request=getfeaturetypename=municipalitiesmaxfeatures=10;

Result begins

{
type: FeatureCollection,
crs: { type: name, properties: { name: urn:ogc:def:crs:EPSG::3067 } 
},
bbox: [ 349631.3148, 7066945.4181, 673079.7106, 7776424.2258 ],
features: [

-Jukka-


 Tom wrote:

Thanks, Jukka.  I see that Geoserver is including the FeatureCollection bbox, 
but my GeoJSON from Mapserver is not.  If I take the json from my WFS call and 
run it through ogr2ogr as you suggested, the output is an exact copy of the 
original.  I still get bbox for the individual features, but not the feature 
collection.  I tried GDAL 1.9 and 2.0-dev.  Perhaps there is something missing 
from my layer configuration, or could it be that Geoserver has this capability 
but Mapserver does not?

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka 
(Tike)
Sent: Monday, June 30, 2014 12:47 PM
To: Tom; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] OGR/GeoJSON WRITE_BBOX

Hi,

About how to test if it is an OGR issue, make a test with OGR. Capture some 
data for example from some Geoserver WFS and convert it into geojson with 
ogr2ogr

ogr2ogr -f geojson test.json -lco WRITE_BBOX=YES 
http://demo.opengeo.org/geoserver/wfs?service=wfsversion=1.0.0request=getfeaturetypename=og:archsitesoutputformat=application/json;

See the beginning of the result

{
type: FeatureCollection,
crs: { type: name, properties: { name: urn:ogc:def:crs:EPSG::26713 
} },
bbox: [ 589860.0, 4914479.0, 608355.0, 4926490.0 ],
features: [

Conclusion: ogr2ogr can do it. My version is GDAL 2.0-dev.

-Jukka Rahkonen-

Tom wrote:
Hi folks,

I’m trying to use OGR to output GeoJSON from my WFS service.  I’d like to 
include the BBOX (equivalent of gml:boundedBy) at the FeatureCollection level.  
From the documentation, it looks like I should be able to set it up this way:

OUTPUTFORMAT
  NAME GEOJSON
  DRIVER OGR/GeoJSON
  MIMETYPE application/json; subtype=geojson
  FORMATOPTION STORAGE=memory
  FORMATOPTION FORM=SIMPLE
FORMATOPTION LCO:WRITE_BBOX=YES
END

According to http://www.gdal.org/drv_geojson.html, WRITE_BBOX is exactly what I 
need.  According to the docs, it should create a bbox at the FeatureCollection 
and the Feature level.  For me, it generates a bbox for every feature, but not 
one for the top-level FeatureCollection, which OGR claims to support.

Does anyone have experience with this?  Any idea how I could determine if this 
would be a Mapserver issue, or an OGR issue?

Thanks,

Tom



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

Re: [mapserver-users] large # of GeoTiffs mapfile/index strategy

2014-06-27 Thread Rahkonen Jukka (Tike)
Hi,

Use gdaltindex with -t_srs http://www.gdal.org/gdaltindex.html and all your 
troubles are solved.

Jukka Rahkonen


Lähettäjä: Mark Korvermailto:mwkor...@gmail.com
Lähetetty: ‎27.‎6.‎2014 21:57
Vastaanottaja: mapserver-usersmailto:mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] large # of GeoTiffs mapfile/index strategy

Hi Experts,
I need a little advice on how to do lots of aerial image GeoTiffs quickly. I 
have a large region with many GeoTiffs covering 9 UTM zones. Typically I would 
put together a map file with layers per utm zone and use shapefile index to 
point at the GeoTiffs. I know that declaring the extent per layer is important 
when you have a lot of layers. The GeoTiffs are RGB, internally tiled, and jpeg 
compressed. They are also about 20-30MB in size.

My question is, has anyone done any testing between doing this via shapefile 
index vs GDAL .vrt files? Which would perform faster?
My current setup is using Mapserver behind nginx in fastcgi mode.
Thanks for any help on this.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Saving mapfiles into GPKG and Spatialite?

2014-06-18 Thread Rahkonen Jukka (Tike)
Hi,

While playing with GPKG and Spatialite which offer a nice way for delivering 
data in ready-to-use format I have been wondering if it could be possible to 
store also mapfiles or GGIS project files and styles into the same database. 
Spatialite has a special tool for importing XML documents so I believe that it 
could be used for storing QGIS files as well as SLD styles. But is there any 
simple way for importing/exporting Mapserver mapfiles to/from SQLite? Export is 
probably needed and therefore there may not be any real advantage over zipping 
the db and mapfile into same package. But I cannot imagine how it could be made 
to work so simply that Mapserver admin would only drop the GPKG into some place 
and users could start using it from 
http://server.org/cgi-bin/mapserv?map=select map from maps where map_id=1

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


[mapserver-users] TinyOWS: Axis order fix wanted

2014-06-18 Thread Rahkonen Jukka (Tike)
Hi,

If there is someone who knows how to fix WFS 1.1.0 axis order in TinyOWS with 
some projections, please contact me. I may be able to help with making it to 
happen.

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


Re: [mapserver-users] Enhancing MapServer performance with GPUs

2014-06-17 Thread Rahkonen Jukka (Tike)
Hi,

This reminds me that I wrote on 15th May, 2014 about slowish performance with 
png8 output when compared with gif. These reports are from the same situation
http://latuviitta.org/documents/MS_64_gif.png
http://latuviitta.org/documents/MS_64_png8.png

Gif is not only faster but also much more stable. Test environment:

- Output 800x600 px WMS GetMaps
- Simple polygons, style with only outlines
- Mapserver 6.4, fcgi
- CentOS 64-bit
- Real server environment

Png outputformat was configured as

OUTPUTFORMAT
  NAME 'AGG_Q'
  MIMETYPE image/png
  DRIVER AGG/PNG
  EXTENSION png
  IMAGEMODE RGB
  FORMATOPTION COMPRESSION=2
  FORMATOPTION QUANTIZE_FORCE=ON
  FORMATOPTION QUANTIZE_DITHER=OFF
  FORMATOPTION QUANTIZE_COLORS=256
  END

Gif output was totally stable at request rate 20/second for the whole 10 
minutes run while png8 tolerates only about 15 request/sec and showed pretty 
slow response times already at low load.

-Jukka Rahkonen-


Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Adam Eskreis
Lähetetty: 17. kesäkuuta 2014 1:51
Vastaanottaja: Paul Ramsey
Kopio: mapserver-users
Aihe: Re: [mapserver-users] Enhancing MapServer performance with GPUs

It's been a while since I've looked at the Mapserver code, but if I'm not 
mistaken it uses the fixed function pipeline for OpenGL which isn't going to be 
able to take advantage of all of those wonderful shader cores very well.  If 
you wrote your own renderer using OpenGL 4.0+, you might be able to get a 
substantial boost in rendering performance, but as Paul said, rendering may not 
be your bottleneck.  You should ensure that it is before spending a lot of 
money on GPU servers.  Also something to keep in mind, when you render with 
OpenGL you must convert all of your polygons into triangle meshes, which can be 
an extremely costly operation, especially for concave polygons that contain 
holes, which are quite common in GIS data.

On Mon, Jun 16, 2014 at 5:42 PM, Paul Ramsey pram...@cleverelephant.ca wrote:
Non-trivial places time can be spent:

- CGI startup (if you aren't using FastCGI)
- reading layers (if you have a lot of them! it's only a ms or two per
layer, but if you have 100 layers...)
- reading data
- rendering data
- compressing output images (more than you'd expect)

I'd expect GPU assisted rendering to be a win only for a narrow
minority of cases, it's not a predominant time sink as often as one
would expect. Plus for all the speed once you have the GPU chain set
up, the setting up of the GPU can be costly, and for a CGI program
like MapServer, that's a big deal.

P


On Sun, Jun 15, 2014 at 2:57 PM, Even Rouault
even.roua...@mines-paris.org wrote:
 Le dimanche 15 juin 2014 23:50:05, Visit Hirankitti a écrit :
 Dear list memers,

 My name is Visit, a newbie of this forum. I have been using MapServer for
 at least 4 years now on many research projects. It has served my research
 projects quite well.

 Recently I am using MapServer to develop a real-world enterprise web
 application.
 I am developing a web-based GIS application using MapServer to serve
 thousands of users, and one of overheads of the system is on the map
 rendering provided by MapServer.

 At the moment the server I use to run MapServer doesn't have a graphic card
 (i.e. GPUs), but I wonder if I really want high performance of
 map-rendering from MapServer, can a graphic card (i.e. GPUs) equipped with
 the server enhance MapServer's map rendering speed and hence improve its
 map service speed?

 As a graphic card contains hundreds of GPU cores, e.g. NVDIA CUDA platform,
 and each core can compute and draw polygons in parallel, so I think this
 can improve the speed of map rendering (if used with MapServer)
 substantially. Do I understand this correctly?

 You'll have to profile where the time is exactly spent in MapServer. If it is
 in pulling data from sources, or in the rendering part itself. There's a
 OpenGL backend available in recent MapServer versions that could potentially
 speed up rendering, but it is likely a bit experimental and might need more
 work.


 Thanks for your advice in advance,

 Visit Hirankitti Ph.D.

 Intelligent Communication and Transportation Lab
 King Mongkut's Institute of Technology Ladkrabang
 Thailand

 --
 Geospatial professional services
 http://even.rouault.free.fr/services.html
 ___
 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] seems to be different render resolutions on lines VS areas

2014-06-16 Thread Rahkonen Jukka (Tike)
Hi,

It would be nice to see a screen capture, my imagination may lead to rendering 
artifacts.

-Jukka Rahkonen-

Malm Paul wrote:

Hi list.
I have a problem, probable newbee fault...
I render a map where I would like to have a 1 pixel grey contour in the borders 
of different colored areas.
I'm getting an image where it looks like the areas is rendered in one 
resolution and the lines in a higher resolution.
The area pixels are 10 times larger than the line pixels. The effect is that 
the pixel color for the 2 different areas are on both sides of the thinner 
border line.
I'm not setting different resolutions for different layers (don't even know if 
it is possible).

If you have the solution I would be more the grateful to take part of it.
/Paul
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] TileIndex - accuracy and truncation ?

2014-06-13 Thread Rahkonen Jukka (Tike)
Hi,

I am sure that the accuracy of tileindex vectors does not make the trouble.  
The tileindex is only used for selecting which images will be needed for 
building the requested output image and this is done by selecting polygons 
which intersect with the requested BBOX.  Once the correct image files are 
selected the georeferencing of the images is read from the images themselves, 
in your case from png + WLD.

I suppose that white lines appear when the selected images are subsampled to a 
non-original pixel size for the output one by one. At the image boundary when 
the image pixels cover less than 50% of the output pixel area the corresponding 
output pixel is painted white. Let's say this was at the upper edge of the 
lower tile. Normally when the same pixel is rendered from the lower edge of the 
upper tile there should be more than 50% image data for the pixel and it should 
be rendered with color. Now for some reason also the upper tile yields white 
pixel and the result is not data for this pixel in lower tile or in upper 
tile.

It is a bit heavy to try to solve the issue only by thinking.  Could you put 
two adjacent tiles with WLD files somewhere so I could have a try with them? 
Tell the EPSG code as well.  Meanwhile, if you have some experience on GDAL or 
if you are willing to learn you can also try to make the mosaic in another way 
than using tileindex. Create a GDAL virtual mosaic file with gdalbuildvrt tool 
and use the resulting .vrt file as datasource for your layer instead of 
tileindex. Read http://www.gdal.org/gdalbuildvrt.html and 
http://www.gdal.org/gdalbuildvrt.html.  As a result GDAL will take care of 
subsampling and it may give different results.

On the other hand, if you could tolerate using GDAL instead of FME you can 
avoid all the trouble by converting your original image into tiled and 
compressed geotiff with overviews.

-Jukka Rahkonen-








Lars I. Nielsen wrote:

Hi,

For performance reasons, I've (used FME to) split a large PNG into 450 small 
tiles, serving them with a Mapserver tileindex as a WMS service to a web 
solution.

Howeever, white lines appear between some of the tile rows (not all) at some 
scales (not all).

I've looked deeper into the WLD files for the individual tiles, and found that 
the calculations are accurate to 1/10 of a nanometer. At least if one uses all 
10 decimals.

Tiles are 2254 pixels high, and (as per the WLDs below) 6138899.3169212583 - 
0.0204375000 * 2254 = 6138853.2507962583 (almost equal to 6138853.2507962584)

Which leads me to suspect that some sort of truncation goes on, yielding some 
sort of rounding error.

Do anyone know whether the tileindex calculations truncates any of the values 
in the WLD files ? And if so, by how much ?

Cheers.

--

A typical map picture with a white line can be seen via this link:

http://hvmgo01.hvenegaard.dk/mswms/mapserv.exe?map=odensekkgd_wms.mapLAYERS=ASSISTENSTRANSPARENT=trueSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=FORMAT=image/pngSRS=epsg:25832BBOX=586609.80952408,6138781.1015875,586686.025,6138857.3142859WIDTH=256HEIGHT=256
Here's the WLD of the two tiles displayed in the picture:

Upper tile WLD:
0.0204375000
0.00
0.00
-0.0204375000
586620.6934394070
6138899.3169212583

Lower tile WLD:
0.0204375000
0.00
0.00
-0.0204375000
586620.6934394070
6138853.2507962584

--

Ps! As I wrote previously, I'm using FME to create the tiles. So I have little 
control over the actual coordinate and pixel values, and only specify the 
number of tiles I need. So manual truncation is not really a viable option.


Kind regards / Med venlig hilsen
Lars I. Nielsen

Landinspektør, Senior GIS Programmør og Konsulent
Hvenegaard Landinspektører A/S
Rugaardsvej 55, DK-5000 Odense C
Denmark
Tel. +45 6313 5050
http://www.hvenegaard.dkhttp://www.hvenegaard.dk/

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

Re: [mapserver-users] WFS and WMS

2014-06-13 Thread Rahkonen Jukka (Tike)
Short answer: yes.  However, you would perhaps like to see an example, or?

-Jukka Rahkonen-

Malm Paul wrote


Hi list!
Is it possible to combine configuration for both WFS and WMS in a mapfile?

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

Re: [mapserver-users] WFS and WMS

2014-06-13 Thread Rahkonen Jukka (Tike)
Hi,

I will need to make one first. I am going to use the famous states.shp that 
is used as one of the demo layers of Geoserver. I would say that we should have 
something similar for Mapserver, a bunch of mapfiles and some demo datasets 
that could be dropped on the server so that they just work and users could see 
examples about how to make layers from shapefiles, geotiffs, tileindexes, and 
OGR connection and set up WMS, WFS and WCS services, activate GetFeatureInfo, 
use labels and  layer groups with min/maxscaledenom and so on.  That would also 
be a great help when reporting and resolving bugs because all parties could 
have the same data on their computers without pain. An official demo server 
would be a great supporting resource and people could send just links like 
See, this one is advertised as a Mapserver WFS in http://demo.mapserver.org/ 
but hey, it is WMS at the same!

http://demo.mapserver.org:8080/cgi-bin/wfs?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYERS=citiesTRANSPARENT=TRUEFORMAT=image%2FpngBBOX=-185.5362494997,-128.25123742265794,186.7522494998,152.38453742265796SRS=EPSG:4326STYLES=



-Jukka Rahkonen-

Malm Paul wrote:

Yes please,
if you have one I would be grateful.
/Paul


From: Rahkonen Jukka (Tike) [mailto:jukka.rahko...@mmmtike.fi]
Sent: den 13 juni 2014 14:30
To: Malm Paul; 'mapserver-users@lists.osgeo.org'
Subject: Re: WFS and WMS

Short answer: yes.  However, you would perhaps like to see an example, or?

-Jukka Rahkonen-

Malm Paul wrote

Hi list!
Is it possible to combine configuration for both WFS and WMS in a mapfile?

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

Re: [mapserver-users] WFS and WMS

2014-06-13 Thread Rahkonen Jukka (Tike)
Hi,

A rough example is here. I am sure it is not perfect but at least both WMS and 
WFS layers work with QGIS 2.0. I know there is an odd mixture of ows*, wms* and 
wfs* metadata items.
http://latuviitta.org/downloads/wms-wfs.zip

Zip file contains a Spatialite database for data and a corresponding mapfile. 
They should work as is with MS4W when the installation drive is c:\ and files 
are extracted into c:\ms4w\apps. The path appears only in few places in the 
mapfile but naturally they must be edited if c:\ms4w\apps is not correct.

The WMS layer had a little extra with two labels but I commented them out 
because they require Mapserver 6.2 and such MS4W version does not exist. The 
whole mapfile is so short that I paste it also here below

MAP
SIZE 800 800
EXTENT -90 -180 90 180
UNITS DD
IMAGECOLOR 20 250 250
WEB
METADATA
ows_enable_request *
wms_bbox_extended true
ows_srs CRS:84 EPSG:4326 EPSG:32634 EPSG:3857 EPSG:2923
wms_title MS 6.1.1 WMS from Spatialite
wfs_title MS 6.1.1 WFS from Spatialite
wfs_onlineresource 
http://localhost/cgi-bin/mapserv.exe?map=c:\ms4w\apps\wms-wfs.map;
 END
END
DEBUG 10
CONFIG PROJ_LIB C:/ms4w/proj/nad
CONFIG CPL_DEBUG ON
CONFIG SQLITE_LIST_ALL_TABLES TRUE
CONFIG MS_ERRORFILE c:/ms4w/tmp/debug.txt
PROJECTION
init=epsg:4326
END
LAYER
NAME states_table
CONNECTIONTYPE OGR
CONNECTION \ms4w\apps\wms-wfs.sqlite
DATA states
PROCESSING CLOSE_CONNECTION=DEFER
TYPE POLYGON
STATUS ON
PROJECTION
init=epsg:4326
END
METADATA
  ows_title states ##REQUIRED
  wfs_srs   EPSG:4326 ## REQUIRED
  gml_include_items all ## Optional (serves all attributes for layer)
  gml_featureid PK_UID ## REQUIRED
END
CLASS
STYLE
COLOR 100 200 100
END
LABEL
COLOR  150 150 150
OUTLINECOLOR 255 255 255
TYPE bitmap
SIZE small
POSITION UL
#TEXT [STATE_FIPS]
PARTIALS FALSE
END
  LABEL
COLOR  150 150 150
OUTLINECOLOR 255 255 255
TYPE bitmap
SIZE small
POSITION LL
#TEXT [STATE_NAME]
PARTIALS FALSE
END
END
END
END

-Jukka Rahkonen-

Rahkonen Jukka wrote:
Hi,

I will need to make one first. I am going to use the famous states.shp that 
is used as one of the demo layers of Geoserver. I would say that we should have 
something similar for Mapserver, a bunch of mapfiles and some demo datasets 
that could be dropped on the server so that they just work and users could see 
examples about how to make layers from shapefiles, geotiffs, tileindexes, and 
OGR connection and set up WMS, WFS and WCS services, activate GetFeatureInfo, 
use labels and  layer groups with min/maxscaledenom and so on.  That would also 
be a great help when reporting and resolving bugs because all parties could 
have the same data on their computers without pain. An official demo server 
would be a great supporting resource and people could send just links like 
See, this one is advertised as a Mapserver WFS in http://demo.mapserver.org/ 
but hey, it is WMS at the same!

http://demo.mapserver.org:8080/cgi-bin/wfs?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=459HEIGHT=346LAYERS=citiesTRANSPARENT=TRUEFORMAT=image%2FpngBBOX=-185.5362494997,-128.25123742265794,186.7522494998,152.38453742265796SRS=EPSG:4326STYLES=



-Jukka Rahkonen-

Malm Paul wrote:

Yes please,
if you have one I would be grateful.
/Paul


From: Rahkonen Jukka (Tike) [mailto:jukka.rahko...@mmmtike.fi]
Sent: den 13 juni 2014 14:30
To: Malm Paul; 'mapserver-users@lists.osgeo.org'
Subject: Re: WFS and WMS

Short answer: yes.  However, you would perhaps like to see an example, or?

-Jukka Rahkonen-

Malm Paul wrote

Hi list!
Is it possible to combine configuration for both WFS and WMS in a mapfile?

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

Re: [mapserver-users] How to use ANNOTATION layer in combination with RASTER data?

2014-06-04 Thread Rahkonen Jukka (Tike)
Hi,

I believe that Mapserver has many pieces for you but perhaps some work will be 
needed for putting them together.

1) For the first, the attribute name for some pixel value based stuff is 
pixel. Here is an example about selecting a pixel value range: 
CLASSITEM [pixel]
  # class using an EXPRESSION using only [pixel].
 CLASS
  EXPRESSION ([pixel] = 25 AND [pixel]  39)

2) I do not know which kind of client application you want to have, but read if 
UTF Grid could be of any use for you 
http://mapserver.org/development/rfc/ms-rfc-93.html
Connectiontype CONTOUR proves that converting your raster into labels is for 
sure possible to do while perhaps not supported at the moment 
http://mapserver.org/development/rfc/ms-rfc-85.html

3) There are also ways to convert your raster data into shapefiles. See for 
example this http://www.slideshare.net/shencoop/qgis-raster-to-point
There is also a SEXTANTE algorithm for this and in my SEXTANTE toolbox it seems 
to be in Vectorization - Raster layer to points layer. There must be 
corresponding ones in GRASS, SAGA and others.
 
-Jukka Rahkonen-


Jorrit Goddijn wrote:



 Hi Jörg, Hi Stephen,
 
 Instead of showing the grayscaled pixels of the RASTER image, I would like to
 show the actual value.
 
 I have my data only in GRIB format available, so creating a point layers  and
 using the FEATURE attribute is not possible as I would need the data as a
 shapefile for that, I am right?
 
 Is there anyway to accomplish this?
 
 Thanks for your time,
 
 Jorrit
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] On Behalf Of Jörg Thomsen
 Sent: dinsdag 3 juni 2014 14:17
 To: mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] How to use ANNOTATION layer in combination
 with RASTER data?
 
 Hi Jorrit,
 
 you want to label you raster dataset with what?
 
 Regards, Jörg
 
 Am 03.06.2014 14:01, schrieb Jorrit Goddijn:
  Hi all,
 
 
 
  I try draw an ANNOTATION type layer based on RASTER type layer.  When
  doing this based on a shape file I would set the LABEL item on the
  ANNOTATION layer to be attribute used in the shapefile.
 
 
 
  What LABELITEM should I use when using RASTER data?
 
 
 
  I posted the Mapfile I have so far hereunder.
 
 
 
  Thank you for your help.
 
 
 
  Bye
 
 
 
  Jorrit
 
 
 
  #-
  ---
 
  #grib wave direction layer example
 
  #-
  ---
 
  LAYER
 
  NAME grib_data
 
  TYPE RASTER
 
 
 
  DATA
 
 /var/www/mapserver/data/grib/routeguard/4nwcurpol99_2013110412.grb2
  #Current direction @ Mean sea level
 
  PROCESSING BANDS=1
 
  PROCESSING SCALE=0,360 #scale all degrees
 
 
 
  PROJECTION
 
  +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +pm=-360
 
  END
 
  END
 
 
 
  #-
  --
 
  # the annotation layer
 
  #-
  --
 
LAYER
 
  NAMEgrib_label
 
  DATAgrib_data
 
  STATUS  OFF
 
  TYPEANNOTATION
 
  CLASSITEM   CLASS # do I need it?
 
  LABELITEM   VAR_10-1-0_L101 #what variable name to use?
 
 
 
  CLASS
 
EXPRESSION [VAR_10-1-0_L101] #gives parse error
 
STYLE
 
  COLOR  -1 -1 -1
 
END
 
 
 
LABEL
 
  COLOR 132 31 31
 
  TYPE TRUETYPE
 
  FONT arial-bold
 
  SIZE 12
 
  ANTIALIAS TRUE
 
  POSITION CL
 
  PARTIALS FALSE
 
  MINDISTANCE 300
 
  BUFFER 4
 
END # end of label
 
  END # end of class
 
END # annotation layer
 
 
 
 
 
 
 
 
 
  ___
  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] Mapserver installation trouble in ubuntu server

2014-06-04 Thread Rahkonen Jukka (Tike)
Hi,

I guess that you must tell Apache that mapserv should be run as cgi-bin script. 
I found the following snippet from httpd.cong file but that file is not in use 
and I do not know if it is valid.

Directory ${HOME}/www/cgi-bin
   SetHandler cgi-script
   Files mapserv
   SetHandler fcgid-script

-Jukka Rahkonen-

Hugo wrote:


Hi all,

I'm having some troubles with a mapserver installation in a hosted ubuntu 
server (12.04).
I've installed it using the regular procedures (apt-get install mapserver-bin 
cgi-mapserver) and i can see from the console that it is installed correctly. 
However, when i try to access it from the browser, using the url 
http:/ip_address/cgi-bin/mapserv it starts to download the bin file and does 
not display the typical message (No query information to decode...).

I remember that i have had this issue some time ago and don't remember how i 
fixed it... i know it is something really simple that i'm missing here.

Could you guys give me some help?

Kind regards,

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

Re: [mapserver-users] Can the PROCESSING layer attribute be set dynamically through (PHP) MapScript?

2014-05-28 Thread Rahkonen Jukka (Tike)
Hi,

It would be easier to play with PROCESSING attributes if they could be changed 
with runtime substitution. Thomas Bonfort has written that any favorite 
MapServer provider can do the addition.

http://lists.osgeo.org/pipermail/mapserver-users/2013-September/075342.html

-Jukka Rahkonen-

Jorrit Goddijn wrote:

 
 Hi Dan,
 
 Yes I only just saw that you can load layer definitions from strings. This 
 would be
 indeed much less  cumbersome than using mapscript. We'll have a look at this
 for our next project/.
 
 Thanks for your input!
 Jorrit
 
 -Original Message-
 From: Dan Little [mailto:theduckylit...@gmail.com]
 Sent: dinsdag 27 mei 2014 16:10
 To: Michael Schulz
 Cc: Jorrit Goddijn; mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] Can the PROCESSING layer attribute be set
 dynamically through (PHP) MapScript?
 
 You might want to reconsider how your script is built.  Instead of loading up 
 the
 Mapfile and tweaking small parameters with MapScript, consider converting
 your mapfile to a template language.  This way you can forumulate the mapfile,
 load it as a string, do the appropriate substitutions, then use PHP to serve 
 it as
 WxS.
 
 This usually ends up being faster, easier to maintain, and more flexible over 
 the
 long term.
 
 On Tue, May 27, 2014 at 6:33 AM, Michael Schulz
 mandsch...@googlemail.com wrote:
  Hi Jorrit,
 
  maybe it's just a type in the second setprocessing line of your example:
 
  $current_layer-setprocessing('BANDS=1,2');  #removed second bracket
 
  Cheers, Michael
 
 
  2014-05-27 11:50 GMT+02:00 Jorrit Goddijn
 jorrit.godd...@meteogroup.com:
 
  Hi all,
 
 
 
  I’m drawing layers based on GRIB data files. Each file contains
  several bands (datasets). I can access these datasets by setting the
  PROCESSING attribute on the LAYER object. As in this example:
 
 
 
  #
 
  LAYER
 
NAME current_grid
 
TYPE POINT
 
CONNECTIONTYPE uvraster
 
DATA
  /var/www/mapserver/data/grib/routeguard/4nwwin99_2013110412.grb2
 #v and
  u-component of current
 
PROCESSING BANDS=1,2
 
PROCESSING UV_SPACING=20
 
CLASS
 
  STYLE
 
SYMBOL arrow
 
ANGLE [uv_angle]
 
SIZE [uv_length]
 
COLOR 255 0 0
 
  END # style
 
END # class
 
 
 
PROJECTION
 
#init=epsg:4326
 
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +pm=-360
 
END
 
  END # layer
 
  
 
 
 
  This works fine. But I need to set the PROCESSING values dynamically
  through mapscript. If I add this code to my script (which works fine
  without these lines):
 
 
 
  
 
  $map = ms_newMapObj($_GET['MAP']);
 
  $current_layer = $map-getlayerbyname('current_grid');
 
  // both of these do not work
 
 //$current_layer-set('processing', 'BANDS=1,2'));
 
  //$current_layer-setprocessing('BANDS=1,2'));
 
  $request = createRequest();
 
 $result = $map-owsdispatch($request);
 
  
 
 
 
  I get an internal server error (500). It seems that setting any
  attribute via the layer-set() method causes this behavior. I’m
  migrating from MS 5.4, does the set method still work as expected?
 
 
 
  Thank you
 
 
 
  Jorrit Goddijn
 
  jorrit.godd...@meteogroup.com
 
  MeteoGroup
 
 
 
 
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 
 
 
  --
  ---
  Michael Schulz
 
  Bahnhofstr. 62
  D-63477 Maintal
 
 
  ___
  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] PostgreSQL on demo.mapserver.org down

2014-05-28 Thread Rahkonen Jukka (Tike)
Hi,

Mapserver demos at demo.mapserver.org do not work because the PostgreSQL on the 
same machine has been down for some days. Could someone try to restart the 
database service?

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


Re: [mapserver-users] PostgreSQL on demo.mapserver.org down

2014-05-28 Thread Rahkonen Jukka (Tike)
Hi Alex,

PostgreSQL service on localhost, port 5432 does not accept connection from user 
www-data for database osm. You can catch the error with this

http://demo.mapserver.org/cgi-bin/foss4g?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapLAYERS=OSM_DenverSTYLES=CRS=EPSG:4326BBOX=-105.208290,39.542378,-104.769779,39.980889WIDTH=800HEIGHT=800FORMAT=image/png

-Jukka-

Alex Mandel wrote:

On 05/28/2014 07:58 AM, Rahkonen Jukka (Tike) wrote:
 Hi,

 Mapserver demos at demo.mapserver.org do not work because the PostgreSQL on 
 the same machine has been down for some days. Could someone try to restart 
 the database service?

 -Jukka Rahkonen-

Which demo/url are you specifically getting an error on? I'm not seeing
anything particularly wrong on the server.

Thanks,
Alex

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


Re: [mapserver-users] PostgreSQL on demo.mapserver.org down

2014-05-28 Thread Rahkonen Jukka (Tike)
Hi Jeff,

Sure it is advertised on the main page http://demo.mapserver.org. Try the 
GetMap link on the row

WMS OpenStreetMap service (GetCapabilities) (GetMap) -used in OpenLayers map 
on main site.

-Jukka-

Jeff McKenna wrote:

 I think at one point that service was used to seed the cache for the
 OpenLayers/Mapcache demo on the main site (Denver OSM).  But that WMS
 service is actually not advertized/published anywhere (the full list of active
 services is available at http://demo.mapserver.org/).
 
 -jeff
 
 
 --
 Jeff McKenna
 MapServer Consulting and Training Services
 http://www.gatewaygeomatics.com/
 
 
 
 On 2014-05-28, 2:45 PM, Rahkonen Jukka (Tike) wrote:
  Hi Alex,
 
  PostgreSQL service on localhost, port 5432 does not accept connection from
 user www-data for database osm. You can catch the error with this
 
  http://demo.mapserver.org/cgi-
 bin/foss4g?SERVICE=WMSVERSION=1.3.0REQUEST=GetMapLAYERS=OS
 M_DenverSTYLES=CRS=EPSG:4326BBOX=-105.208290,39.542378,-
 104.769779,39.980889WIDTH=800HEIGHT=800FORMAT=image/png
 
  -Jukka-
  
  Alex Mandel wrote:
 
  On 05/28/2014 07:58 AM, Rahkonen Jukka (Tike) wrote:
  Hi,
 
  Mapserver demos at demo.mapserver.org do not work because the
 PostgreSQL on the same machine has been down for some days. Could someone
 try to restart the database service?
 
  -Jukka Rahkonen-
 
  Which demo/url are you specifically getting an error on? I'm not seeing
  anything particularly wrong on the server.
 
  Thanks,
  Alex
 
 
 
 ___
 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] Mapserver does not accept SLD that it creates herself

2014-05-22 Thread Rahkonen Jukka (Tike)
Hi,

I found this one from stackexchange
http://gis.stackexchange.com/questions/74846/error-using-sld-with-mapserver-based-wms-geobc/95945#95945

In short, Mapserver was asked to send a SLD file out with WMS GetStyles request 
but the very same Mapserver did not accept that SLD when it was used in WMS 
GetMap as SLD= parameter. The reason was that a filter ogc:PropertyIsEqualTo 
was send out but Mapserver only accepts ogc:PropertyIsLike.  Can this still 
happen with Mapserver 6.4 and 7.0?

The failing SLD can still be captured from 
http://openmaps.gov.bc.ca/mapserver/base3?service=wmsversion=1.1.1request=GetStyleslayers=BC_MAJOR_CITIES_POINTS_500M

-Jukka Rahkonen-

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


Re: [mapserver-users] WFS with featureID, maxFeatures, BBOX

2014-05-20 Thread Rahkonen Jukka (Tike)
Hi,

Right, so it is written into WFS 1.1.0 standard (table 9a):
FEATUREID
(Mutually exclusive with FILTER and BBOX)

You knew it, didn't you? Nobody says mutually exclusive in real life ;)

-Jukka Rahkonen-


Eichner, Andreas - SID wrote:
 
 AFAIK FeatureID and BBOX are mutually exclusive.
 
 Von: mapserver-users-boun...@lists.osgeo.org [mapserver-users-
 boun...@lists.osgeo.org]quot; im Auftrag von quot;Nathan Smith
 [nsmit...@nd.edu]
 Gesendet: Montag, 19. Mai 2014 18:05
 An: mapserver-users@lists.osgeo.org
 Betreff: [mapserver-users] WFS with featureID, maxFeatures,  BBOX
 
 Hi all,
 
 I've been getting some unexpected results combining BBOX and MaxFeatures
 and was hoping someone might be able to explain why.  I have a web app that
 uses OpenLayers with a MapServer WFS layer.  A typical WFS request is POST
 with a bunch of featureID items, maxfeatures: 1000,  a bbox set by OL.  It
 seems that when the featureID list gets over 1000, instead of first filtering 
 by
 BBOX and then truncating maxFeatures it applies the limit first.  Actually 
 I'm not
 sure bbox is being applied at all.
 
 Any ideas?  Is the the correct behavior?
 
 Thanks,
 - Nathan Smith
 
 ___
 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] About FILTER and FILTERITEM

2014-05-20 Thread Rahkonen Jukka (Tike)
Hi,

Obviously I was wrong and concatenation works with MS 6.x series as suggested 
by Håvart Tveite:
FILTER ([STATE_NAME]+[STATE_FIPS]=Illinois17)

This is a good question to Mapserver Guru Quiz final (no internet connections 
allowed).

-Jukka-

Rahkonen Jukka wrote:
 
 Hi,
 
 I started to play with filter and filteritem  because I happened to see this
 question http://gis.stackexchange.com/questions/65724/mapserver-6-2-
 concatenate-attributes-in-filter. I thought that the idea was odd and 
 unpractical
 but interesting and I thought it would be fast to test. It was not but at 
 least it
 was educational.
 
 I can do such concatenation simply with Spatialite data by using the layer 
 DATA
 as CONNECTION \ms4w\apps\states_spl_3.sqlite
 DATA select * from states_view where STATE_NAME||STATE_FIPS='Illinois17'
 
 I am ready to believe that such concatenation with FILTER is not possible with
 the 6.x series. Other opinions?
 
 -Jukka Rahkonen-
 
 Lime, Steve D (MNIT) wrote:
 
  FIlters are used primarily under the hood for certain types of query 
  operations.
  The main differences are:
 
- FILTERs are defined in the native query language of the underlying
  driver. So for PostGIS you'd actually write a little SQL snippet.
- FILTERs are applied when data are pulled from the underlying data
  source (like a WHERE clause) and have no impact on rendering choices.
 
  For drivers that don't have an native query capability (e.g.
  shapefiles) the syntax is identical to expressions. For drivers that
  do have a native query capability there really isn't much use for
  filters since you can just add a where clause to the data statement.
 
  Where I have found them useful sometimes is for simplifying class 
  expressions.
  Let's say you have a shapefile and you only want to show features of a
  certain type, and then for those features you want to draw things
  differently based on another attribute.
 
  You could use logical expressions:
 
  CLASS
EXPRESSION ([type] = 1 AND '[attr]' = 'a')
...
  END
  CLASS
EXPRESSION ([type] = 1 AND '[attr]' = 'b')
...
  END
 
  or you could use a combination of FILTER and EXPRESSIONS
 
  FILTERITEM 'type'
  FILTER '1'
 
  CLASSITEM 'attr'
  CLASS
EXPRESSION 'a'
...
  END
  CLASS
EXPRESSION 'b'
...
  END
 
  Personal preference I guess and the second option is a bit more
  performant, especially in older versions. I guess my recommendation
  would be avoid FILTERs unless you have a good reason to use them.
 
  Steve
 
  
  From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-
  boun...@lists.osgeo.org] on behalf of Rahkonen Jukka  (Tike)
  [jukka.rahko...@mmmtike.fi]
  Sent: Wednesday, May 14, 2014 8:05 AM
  To: mapserver-users@lists.osgeo.org
  Subject: Re: [mapserver-users] About FILTER and FILTERITEM
 
  Hi,
 
  Thank you very much, Christy. By your example I made some tests and
  now filters like this work for me FILTER (([WORKERS]2000) OR
  ([STATE_FIPS]=17))
 
  The secret element was the right syntax for string attributes
  ([STATE_FIPS]=17).
  Now when I know how it must be used I can find corresponding examples
  from the expression page of Mapserver documentation. Could someone
  explain shortly what is the difference between filter and expression?
  To me they seem to do pretty similar work.
 
  -Jukka Rahkonen-
 
  Christy Nieman wrote:
 
   You do not need to set both FILTERITEM and FILTER.  You can just set
   FILTER to an expression using as many attributes as you need. e.g.
   FILTER (( [POPULATION]  50 ) AND ([DISPLAY] == 1)). Just
   like you can have multiple attributes in a class EXPRESSION.
  
   I think it's the section of the document that is key - the
   MapServer
  Expressions
   section talks about using FILTER and EXPRESSION in more complex
   logical expressions, where as the section you quoted is talking
   about basic string comparison.
  
   Christy
  
   On 14/05/14 08:03 AM, Rahkonen Jukka (Tike) wrote:
Hi,
   
 From document page: http://mapserver.org/mapfile/expressions.html
To use a string comparison for filtering a LAYER, both FILTERITEM
and FILTER
   must be set. FILTERITEM is set to the attribute name. FILTER is set
   to the value for comparison. The same rule applies to CLASSITEM in
   the LAYER object and EXPRESSION in the CLASS object.
   
That would mean that only one attribute from the data can be used
for
   building a filter. Is this true or just old information living in the 
   document?
   
-Jukka Rahkonen-
___
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] EPSG: 3844 problem

2014-05-16 Thread Rahkonen Jukka (Tike)
Hi,

EPSG:3844 seems to be a system with Northing-Easting coordinate axis order:

http://epsg-registry.org/report.htm?type=selectionentity=urn:ogc:def:crs:EPSG::3844reportDetail=shortstyle=urn:uuid:report-style:default-with-codestyle_name=OGP%20Default%20With%20Codetitle=EPSG:3844

Two solutions:
- Use WMS 1.1.1
- Flip the coordinates in the BBOX of WMS 1.3.0

-Jukka Rahkonen-

Petr Suk wrote:

hi there,
I am trying to set up WMS with EPSG:3844. The source data are GTiffs 
(EPSG:3844). The problem is, that GetMap request sends only blank images when 
3844 is used. If the request is with EPSG:4326 everything is fine and the 
transformation is OK too.
The mapfile looks like:

MAP
  NAME Romania_Orthophoto
  SIZE 400 300
  EXTENT 419332.586421 240848.815804 459780.109320 259741.205149
  UNITS METERS
  SHAPEPATH //data/romania/Olt/
  IMAGECOLOR 255 255 255
  IMAGETYPE PNG
  WEB
METADATA
 wms_title   Romania OrthoPhoto
 wms_onlineresource  http://localhost/cgi-bin/wms/romania;
 wms_srs EPSG:4326 EPSG:3844
 wms_enable_request *
 wms_extent 419332.586421 240848.815804 459780.109320 259741.205149
END
  END
  PROJECTION
  init=epsg:3844
  END
LAYER
  NAME orthophoto
  STATUS ON
  TILEINDEX olt.shp
  OFFSITE 255 255 255
  OPACITY 85
  TYPE RASTER
  METADATA
wms_title   orthophoto
  END
END
END
#
GetMap looks like:
SERVICE=WMSVERSION=1.3.0REQUEST=GetMapBBOX=419102.35417775972746313,240475.32843947352375835,459895.23908429278526455,260119.92758433445123956CRS=EPSG:3844WIDTH=1521HEIGHT=731LAYERS=orthophotoSTYLES=FORMAT=image/pngDPI=96MAP_RESOLUTION=96FORMAT_OPTIONS=dpi:96TRANSPARENT=TRUE

I am running mapserver 6.2.1 on Ubuntu 12.04 with proj 4.8.0 and gdal 1.10

Thanks a lot for any hints.
Petr
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Slow output to PNG format with Mapserver 6.4

2014-05-15 Thread Rahkonen Jukka (Tike)
Hi,

We were running speed tests with Mapserver 6.4 on Linux 64-bit and we found 
that WMS output to GIF and JPEG was much faster (+30% or more) and much more 
stable (less variation in response times) than png8 outputformat. I was 
surprised because I have not observed the same on Windows. However, I have not 
tested GIF output on Windows seriously. I tried it on Linux because I had a 
feeling that our Mapserver wan unnecessary slow with png.

Is this natural? Changing the png compression rate did not make much difference 
in speed, it mostly affected the size of generated files. My outputformat is 
taken from Mapserver documentation.

OUTPUTFORMAT
  NAME 'AGG_Q'
  MIMETYPE image/png
  DRIVER AGG/PNG
  EXTENSION png
  IMAGEMODE RGB
  FORMATOPTION QUANTIZE_FORCE=ON
  FORMATOPTION QUANTIZE_DITHER=OFF
  FORMATOPTION QUANTIZE_COLORS=256
  END

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


[mapserver-users] Update MapServer in demo.mapserver.org?

2014-05-14 Thread Rahkonen Jukka (Tike)
Hi,

I hope that right persons are reading this list. As a user I appreciate that 
there is a demo server online so I can try if some troubles we have are 
specific for us. However, the demo site demo.mapserver.org is running MapServer 
version 5.6.5 while we run 6.4 and those versions do not behave in a similar 
way. Could it be possible to update the site to use Mapserver 6.4? Version 
5.6.5 is three years old so might be worth considering if updates could happen 
even more frequently in the future.

-Jukka Rahkonen-


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


[mapserver-users] Time to make a new demo?

2014-05-14 Thread Rahkonen Jukka (Tike)
Hi,

Mapserver documentation for the new users 
http://mapserver.org/introduction.html is having a title Get demo running. It 
contains a link to a zipped workshop material 
http://maps.dnr.state.mn.us/mapserver_demos/workshop-5.4.zip

I am not sure if that workshop is a good starting point for the new users any 
more now when we are at Mapserver version 6.4 and soon 7.0. The workshop just 
does not work with recent Mapserver versions which makes potential new users 
sad.

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


Re: [mapserver-users] MapServer calculates wrong WGS84BoundingBox for WCS request using EPSG:28992

2014-05-14 Thread Rahkonen Jukka (Tike)
Hi,

Both my MS4W with Mapserver 6.3-dev and 6.4 on Linux use these definitions
# Amersfoort / RD New
28992 +proj=sterea +lat_0=52.156160 +lon_0=5.387639 
+k=0.079 +x_0=155000 +y_0=463000 +ellps=bessel 
+towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m 
+no_defs  

You say that they wrong and +towgs84 parameters in your mapfile are correct? If 
so, then you can update the values into your epsg file that is in your PROJ_LIB 
directory. We seem to have PROJ-4.8.0 on Linux.

I have seen with WMS that supports many projections that extent calculations 
for different projections are not always reliable. It is more reliable if layer 
extents are given in the layer metadata. Add wcs_extent metadata as shown in 
http://www.mapserver.org/ogc/wcs_server.html and try if that changes anything.

-Jukka Rahkonen-


Christian Braun wrote:

Dear list members,

I just discovered that my MapServer installation is calculating a wrong 
WGS84BoundingBox tag.

I know that were issues in the past with the definition of EPSG:28992 in which 
my data is stored. I was checking all epsg files on the system and als set the 
config flag for PROJ_LIB in the map file. But it seems that MapServer is still 
ignoring the correct settings for EPSG:28992 and takes the old definition 
without proper proj towgs flags.

The services are public and you can find below the links [1] to a 
DescribeCoverage for the WCS I am refering to. ro_dsm_mini is a small layer 
which I am using for testing. BBOX in 28992 is the correct one of the data 
source, the corresponding WGS84BoundingBox which is giving back is wrong.
I am using http://cs2cs.mygeodata.euhttp://cs2cs.mygeodata.eu/ for checking.

I also paste the relevant part of the map file [2].


Any further help is appreciated.
Many thanks in advance,
Christian


[1]
http://maps.iguess.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/MapFiles/RO_localOWS_test.mapSERVICE=WCSVERSION=1.1.0REQUEST=DescribeCoverageCOVERAGEID=ro_dsm_mini


[2]
MAP
  NAME TUDOR_RO_test-environment
  EXTENT 65956 431299 93267 451459
  SIZE 800 600
  MAXSIZE 5
  UNITS METERS
  SHAPEPATH /srv/sampleData/
  IMAGECOLOR 255 255 255

  PROJECTION
#+proj=sterea +lat_0=52.156160 +lon_0=5.387639 
+k=0.079 +x_0=155000 +y_0=463000 +ellps=bessel 
+towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m 
+no_defs
init=epsg:28992
  END

  CONFIG PROJ_LIB /usr/share/proj/

  LAYER # -
NAME ro_dsm_mini
TYPE RASTER
STATUS ON
DATA ro_dsm_mini.tiff

#PROCESSING SCALE=AUTO

PROJECTION
  +proj=sterea +lat_0=52.156160 +lon_0=5.387639 
+k=0.079 +x_0=155000 +y_0=463000 +ellps=bessel 
+towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m 
+no_defs  # the projection of the source data set
  #init=epsg:28992
END

METADATA
  ows_title DSM subset
  ows_abstract This a test data set of Rotterdams DSM subset

  wms_include_items value_0
  wms_value_0_alias Height

  wcs_label   ro_dsm_mini  ### required
  wcs_rangeset_name   Range 1  ### required to support DescribeCoverage 
request
  wcs_rangeset_label  My Label ### required to support DescribeCoverage 
request
  wcs_formats img
END



Christian Braun
R+D Engineer
Environmental Modelling, Geocomputation

Tel: +352- 425991-6608
Mobil: +49-179-6845896
Mail: christian.br...@tudor.lumailto:christian.br...@tudor.lu

Resource Centre for Environmental Technologies,
Public Research Centre Henri Tudor,
6A, avenue des Hauts-Fourneaux,
L-4362 Esch-sur-Alzette, Luxembourg

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

Re: [mapserver-users] MapServer calculates wrong WGS84BoundingBox for WCS request using EPSG:28992

2014-05-14 Thread Rahkonen Jukka (Tike)
Hi,

Two quick things to try:
- turn on PROJ_DEBUG 
http://www.mapserver.org/optimization/debugging.html#step-4-turn-on-proj-debug-optional
- edit your epsg file and make some changes to the two first parameters of the 
+towgs84. That should make your map data to slide in S-N and W-E direction once 
data are reprojected. If this happens you know for sure that the PROJ library 
that is used is the one you believe.

If correct PROJ is in use I would then check if there is also errors in the 
data. Take a sample of data into another projection from WCS and check it. It 
can be that the error is only in the WGS84 bounding box calculation.

-Jukka Rahkonen-

Christian Braun

Hello,
ok, maybe I was not clear enough in my description.
There were several changes in the past to EPSG:28992. The first change was to 
add some towgs parameters, which you could find in my map file, later there was 
a revision to the ones you are showing in your definition. Between this two 
towgs flags there isn't much difference or almost no difference in a final map. 
But if you leave out the flags at all, you will get errors in your spatial 
position of a few hundred meters.

No matter what I set in the epsg file or in the map file as projection 
parameter of the source data set, MapServer is calculating in the 
DescribeCoverage an extent that matches very close the values that would have 
been given back by the old erroneous epsg (the one without towgs flags) 
definition. You can check that with the online calculator tool quite easily if 
you try to convert the bounding boxes.

For me it seems that the projection parameters are read from somewhere else in 
the system where an old definition is present...

cheers,
Christian

BTW: setting wcs_extent didn't help...




Christian Braun
R+D Engineer
Environmental Modelling, Geocomputation

Tel: +352- 425991-6608
Mobil: +49-179-6845896
Mail: christian.br...@tudor.lumailto:christian.br...@tudor.lu

Resource Centre for Environmental Technologies,
Public Research Centre Henri Tudor,
6A, avenue des Hauts-Fourneaux,
L-4362 Esch-sur-Alzette, Luxembourg

On 14 May 2014, at 10:49, Rahkonen Jukka (Tike) 
jukka.rahko...@mmmtike.fimailto:jukka.rahko...@mmmtike.fi wrote:


Hi,

Both my MS4W with Mapserver 6.3-dev and 6.4 on Linux use these definitions
# Amersfoort / RD New
28992 +proj=sterea +lat_0=52.156160 +lon_0=5.387639 
+k=0.079 +x_0=155000 +y_0=463000 +ellps=bessel 
+towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m 
+no_defs  

You say that they wrong and +towgs84 parameters in your mapfile are correct? If 
so, then you can update the values into your epsg file that is in your PROJ_LIB 
directory. We seem to have PROJ-4.8.0 on Linux.

I have seen with WMS that supports many projections that extent calculations 
for different projections are not always reliable. It is more reliable if layer 
extents are given in the layer metadata. Add wcs_extent metadata as shown in 
http://www.mapserver.org/ogc/wcs_server.html and try if that changes anything.

-Jukka Rahkonen-


Christian Braun wrote:

Dear list members,

I just discovered that my MapServer installation is calculating a wrong 
WGS84BoundingBox tag.

I know that were issues in the past with the definition of EPSG:28992 in which 
my data is stored. I was checking all epsg files on the system and als set the 
config flag for PROJ_LIB in the map file. But it seems that MapServer is still 
ignoring the correct settings for EPSG:28992 and takes the old definition 
without proper proj towgs flags.

The services are public and you can find below the links [1] to a 
DescribeCoverage for the WCS I am refering to. ro_dsm_mini is a small layer 
which I am using for testing. BBOX in 28992 is the correct one of the data 
source, the corresponding WGS84BoundingBox which is giving back is wrong.
I am using http://cs2cs.mygeodata.euhttp://cs2cs.mygeodata.eu/ for checking.

I also paste the relevant part of the map file [2].


Any further help is appreciated.
Many thanks in advance,
Christian


[1]
http://maps.iguess.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/MapFiles/RO_localOWS_test.mapSERVICE=WCSVERSION=1.1.0REQUEST=DescribeCoverageCOVERAGEID=ro_dsm_mini


[2]
MAP
  NAME TUDOR_RO_test-environment
  EXTENT 65956 431299 93267 451459
  SIZE 800 600
  MAXSIZE 5
  UNITS METERS
  SHAPEPATH /srv/sampleData/
  IMAGECOLOR 255 255 255

  PROJECTION
#+proj=sterea +lat_0=52.156160 +lon_0=5.387639 
+k=0.079 +x_0=155000 +y_0=463000 +ellps=bessel 
+towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m 
+no_defs
init=epsg:28992
  END

  CONFIG PROJ_LIB /usr/share/proj/

  LAYER # -
NAME ro_dsm_mini
TYPE RASTER
STATUS ON
DATA ro_dsm_mini.tiff

#PROCESSING SCALE=AUTO

PROJECTION
  +proj=sterea +lat_0=52.156160 +lon_0

[mapserver-users] About FILTER and FILTERITEM

2014-05-14 Thread Rahkonen Jukka (Tike)
Hi,

From document page: http://mapserver.org/mapfile/expressions.html
To use a string comparison for filtering a LAYER, both FILTERITEM and FILTER 
must be set. FILTERITEM is set to the attribute name. FILTER is set to the 
value for comparison. The same rule applies to CLASSITEM in the LAYER object 
and EXPRESSION in the CLASS object.

That would mean that only one attribute from the data can be used for building 
a filter. Is this true or just old information living in the document?

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


Re: [mapserver-users] About FILTER and FILTERITEM

2014-05-14 Thread Rahkonen Jukka (Tike)
Hi,

Thank you very much, Christy. By your example I made some tests and now filters 
like this work for me
FILTER (([WORKERS]2000) OR ([STATE_FIPS]=17))

The secret element was the right syntax for string attributes  
([STATE_FIPS]=17).
Now when I know how it must be used I can find corresponding examples from the 
expression page of Mapserver documentation. Could someone explain shortly what 
is the difference between filter and expression? To me they seem to do pretty 
similar work.

-Jukka Rahkonen-

Christy Nieman wrote:

 You do not need to set both FILTERITEM and FILTER.  You can just set FILTER to
 an expression using as many attributes as you need. e.g.
 FILTER (( [POPULATION]  50 ) AND ([DISPLAY] == 1)). Just like you can
 have multiple attributes in a class EXPRESSION.
 
 I think it's the section of the document that is key - the MapServer 
 Expressions
 section talks about using FILTER and EXPRESSION in more complex logical
 expressions, where as the section you quoted is talking about basic string
 comparison.
 
 Christy
 
 On 14/05/14 08:03 AM, Rahkonen Jukka (Tike) wrote:
  Hi,
 
   From document page: http://mapserver.org/mapfile/expressions.html
  To use a string comparison for filtering a LAYER, both FILTERITEM and 
  FILTER
 must be set. FILTERITEM is set to the attribute name. FILTER is set to the 
 value
 for comparison. The same rule applies to CLASSITEM in the LAYER object and
 EXPRESSION in the CLASS object.
 
  That would mean that only one attribute from the data can be used for
 building a filter. Is this true or just old information living in the 
 document?
 
  -Jukka Rahkonen-
  ___
  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] msCGILoadMap(): Web application error CGI variable map is not set

2014-05-14 Thread Rahkonen Jukka (Tike)
I don’t know what really fails because I have never used Mapserver this way. 
However, the error message seems to be true.
When using Mapserver trough WMS the same message comes with a request
http://hip.latuviitta.org/cgi-bin/mapserv?service=wmsversion=1.3.0request=getcapabilities
If map parameter is used with an invalid value the error message is different
http://hip.latuviitta.org/cgi-bin/mapserv?service=wmsversion=1.3.0request=getcapabilitiesmap=foo

Have a look at the code and think if the name of your mapfile really goes into 
[map].

-Jukka Rahkonen-



Enrico Fiore wrote:

Sorry I have sent the first message for error, I conclude it in this post
the template file text is:

!-- MapServer Template --
html
headtitleSeconda Mappa/title/head
body
form name=the_form method=GET action=[program]
table width=100%
tr
td width=60%
input name=img type=image src=[img] width=640 
height=480 order=2
/td
td width=40% align=left
table border=1 width=300
tr
td align=center colspan=3
input type=submit value=Ricarica
/td
/tr
tr
td align=center colspan=3Zoom/td
/tr
tr
td align=right width=100
Zoom In
input type=radio name=zoomdir value=1 
[zoom_dir_1_check]
/td
td align=right width=100
Size
input type=text name=zoomsize size=2 
value=[zoomsize]
/td
/tr
tr
td align=center colspan=3
Pan
input type=radio name=zoomdir value=0 
[zoomdir_0_check]
/td
/tr
/table
hr size=1
table
tr
td colspan=3
input type=checkbox name=layer 
value=Regioni [Regioni_check]
Regioni
/td
/tr
tr
td colspan=3
input type=checkbox name=layer 
value=Fiumi [Fiumi_check]
Fiumi
/td
/tr
tr
td colspan=3
input type=checkbox name=layer 
value=Province [Province_check]
Province
/td
/tr
/table
/td
/tr
/table
input type=hidden name=imgxy value=320 240
input type=hidden name=imgext value=[mapext]
input type=hidden name=map value=[map]
input type=hidden name=program value=[program]
/form
/body
/html

My question is what I miss in my exercise.
Can anyone help me?

And sorry for to have split the message in two post.

With thanks,
Enrico


2014-05-14 14:58 GMT+02:00 Enrico Fiore 
enricofior...@gmail.commailto:enricofior...@gmail.com:
Hi,
I tried to create a simple map application whit zoom and pan capabilities, 
following the instructions contained in the book Beginning MapServer.
I created a map file (secondo.map), an initialization file (secondo_i.html) and 
a template file (secondo.html).

When I lunch the command

http://localhost/secondo_i.html
the browser shows this error message:

msCGILoadMap(): Web application error. CGI variable map is not set.
I work with Mapserver 6.4.1-2 and OS: Ubuntu 14.04


Text contained in initialization file:

html
headtitleMapServer Seconda mappa/title/head
body
form method=POST action=/cgi-bin/mapserv
input type=submit value=Clicca qui
input type=hidden name=program value=/cgi-bin/mapserv
input type=hidden name= map value = 
/home/enrico/mapserverdata/secondo.map
input type=hidden name=zoomsize size=2 value=2
input type=hidden name=layers value=Regioni Fiumi Province
/form
/body
/html


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

Re: [mapserver-users] About FILTER and FILTERITEM

2014-05-14 Thread Rahkonen Jukka (Tike)
Hi,

I started to play with filter and filteritem  because I happened to see this 
question 
http://gis.stackexchange.com/questions/65724/mapserver-6-2-concatenate-attributes-in-filter.
 I thought that the idea was odd and unpractical but interesting and I thought 
it would be fast to test. It was not but at least it was educational.

I can do such concatenation simply with Spatialite data by using the layer DATA 
as
CONNECTION \ms4w\apps\states_spl_3.sqlite
DATA select * from states_view where STATE_NAME||STATE_FIPS='Illinois17'

I am ready to believe that such concatenation with FILTER is not possible with 
the 6.x series. Other opinions?

-Jukka Rahkonen-

Lime, Steve D (MNIT) wrote:
 
 FIlters are used primarily under the hood for certain types of query 
 operations.
 The main differences are:
 
   - FILTERs are defined in the native query language of the underlying 
 driver. So
 for PostGIS you'd actually write a little SQL snippet.
   - FILTERs are applied when data are pulled from the underlying data source 
 (like
 a WHERE clause) and have no impact on rendering choices.
 
 For drivers that don't have an native query capability (e.g. shapefiles) the 
 syntax
 is identical to expressions. For drivers that do have a native query 
 capability
 there really isn't much use for filters since you can just add a where clause 
 to the
 data statement.
 
 Where I have found them useful sometimes is for simplifying class expressions.
 Let's say you have a shapefile and you only want to show features of a certain
 type, and then for those features you want to draw things differently based on
 another attribute.
 
 You could use logical expressions:
 
 CLASS
   EXPRESSION ([type] = 1 AND '[attr]' = 'a')
   ...
 END
 CLASS
   EXPRESSION ([type] = 1 AND '[attr]' = 'b')
   ...
 END
 
 or you could use a combination of FILTER and EXPRESSIONS
 
 FILTERITEM 'type'
 FILTER '1'
 
 CLASSITEM 'attr'
 CLASS
   EXPRESSION 'a'
   ...
 END
 CLASS
   EXPRESSION 'b'
   ...
 END
 
 Personal preference I guess and the second option is a bit more performant,
 especially in older versions. I guess my recommendation would be avoid FILTERs
 unless you have a good reason to use them.
 
 Steve
 
 
 From: mapserver-users-boun...@lists.osgeo.org [mapserver-users-
 boun...@lists.osgeo.org] on behalf of Rahkonen Jukka  (Tike)
 [jukka.rahko...@mmmtike.fi]
 Sent: Wednesday, May 14, 2014 8:05 AM
 To: mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] About FILTER and FILTERITEM
 
 Hi,
 
 Thank you very much, Christy. By your example I made some tests and now
 filters like this work for me FILTER (([WORKERS]2000) OR
 ([STATE_FIPS]=17))
 
 The secret element was the right syntax for string attributes
 ([STATE_FIPS]=17).
 Now when I know how it must be used I can find corresponding examples from
 the expression page of Mapserver documentation. Could someone explain
 shortly what is the difference between filter and expression? To me they seem
 to do pretty similar work.
 
 -Jukka Rahkonen-
 
 Christy Nieman wrote:
 
  You do not need to set both FILTERITEM and FILTER.  You can just set
  FILTER to an expression using as many attributes as you need. e.g.
  FILTER (( [POPULATION]  50 ) AND ([DISPLAY] == 1)). Just like
  you can have multiple attributes in a class EXPRESSION.
 
  I think it's the section of the document that is key - the MapServer
 Expressions
  section talks about using FILTER and EXPRESSION in more complex
  logical expressions, where as the section you quoted is talking about
  basic string comparison.
 
  Christy
 
  On 14/05/14 08:03 AM, Rahkonen Jukka (Tike) wrote:
   Hi,
  
From document page: http://mapserver.org/mapfile/expressions.html
   To use a string comparison for filtering a LAYER, both FILTERITEM
   and FILTER
  must be set. FILTERITEM is set to the attribute name. FILTER is set to
  the value for comparison. The same rule applies to CLASSITEM in the
  LAYER object and EXPRESSION in the CLASS object.
  
   That would mean that only one attribute from the data can be used
   for
  building a filter. Is this true or just old information living in the 
  document?
  
   -Jukka Rahkonen-
   ___
   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] Mapserver shows all nodes on a GeometryCollection

2014-05-05 Thread Rahkonen Jukka (Tike)
Hi,

Could you possibly show us the whole LAYER from your mapfile and one 
GeometryCollection as WKT? Perhaps someone gets interested in making some 
trials.

Do you feel that there is something odd with your sample SQL? For me it looks 
like your GeometryCollection has one point, one linestring and one polygon and 
your query correctly finds them all one by one.

-Jukka Rahkonen-

drobins wrote:
 
 Hi Jörg,
 I did some research:
 the query
 select st_astext (ST_CollectionExtract ('POINT (0 0)', 3)); returns Polygon
 empty
 select st_astext (ST_CollectionExtract ('POINT (0 0)', 2)) returns Empty 
 String
 Line
 select st_astext (ST_CollectionExtract ('POINT (0 0)', 1)) returns POINT 
 (0,0)
 
 So far so good
 
 However, the query's
 select ST_AsText (geom), ST_CollectionExtract (geom, 1) select ST_AsText
 (geom), ST_CollectionExtract (geom, 2) select ST_AsText (geom),
 ST_CollectionExtract (geom, 3) returns all the same results POINT 
 (137237.8268
 431571.3851)
 LINE STRING (136944.60681 431208.56879,136987.41809
 431205.51391)
 POLYGON ((138960.87229 438028.94701,138954.04612
 438015.9692,138951.5854 438017.2392,138953.60948
 438022.39861,138962.5392 438042.0042,138973.61211
 438066.17399,138977.8189 438064.50711,138970.0799
 438048.71139,138960.872 (...)
 
 Any of this rings a bell perhaps?
 
 
 
 --
 View this message in context: http://osgeo-
 org.1560.x6.nabble.com/Mapserver-shows-all-nodes-on-a-GeometryCollection-
 tp5135064p5138520.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] [MS-master] SLD request and style + label behaviour

2014-05-03 Thread Rahkonen Jukka (Tike)
Hi,

First thing to check is if OSM buildings really have names in the data or maybe 
test by using osm_id as labelitem because it for sure exists for all the 
buildings. Other things to do is to add also DEBUG 5 into your layer, check 
that ms_errorfile is set and see what messages it collects. Hmm, and check if 
font sc can be found. Jeff will soon tell you to use shp2img for testing but 
perhaps a good WMS client is here better because of all the scale dependent 
layers used in OSM mapfiles.

-Jukka Rahkonen-



Yves Jacolin wrote:

 Hello,

 I am testing MapServer master this week and I found some curious behaviour.

# I am using :
* basemaps for the mapfile with data from OSM in France.
* MapServer master, built today
$ /usr/lib/cgi-bin/mapserv -v
MapServer version 6.5-dev OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=XMP
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS
INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

# Testing:
* export sld with GetStyles request on buildings15 layer.

Layer definition:

LAYER
STATUS ON
PROJECTION
init=epsg:3857
END
GROUP default
NAME buildings15
TYPE POLYGON
CONNECTIONTYPE postgis
CONNECTION host=localhost dbname=france user=yves password=yves
port=5432
DATA geometry from (select geometry,osm_id, name as name from
osm_buildings) as foo using unique osm_id using srid=3857
LABELITEM name
PROCESSING LABEL_NO_CLIP=ON
PROCESSING CLOSE_CONNECTION=DEFER
MAXSCALEDENOM 20313
MINSCALEDENOM 10156
CLASS
  STYLE
 COLOR #bb
 OPACITY 50
  END
  STYLE
 OUTLINECOLOR #33
 WIDTH 0
  END
  LABEL
 TYPE TRUETYPE
 FONT sc
 PARTIALS FALSE
 MINFEATURESIZE AUTO
 SIZE 8
 COLOR 0 0 0
 OUTLINECOLOR 255 255 255
 OUTLINEWIDTH 2
 WRAP ' '
 MAXLENGTH 6
 ALIGN CENTER
  END
   END
END

# Issues:

* GetStyle request:
- Gives me a label definition (which seems corrects to me, except that there is
no outlinecolor/width parameters)
- Gives me a stroke-width value of 1 instead of 0

* GetMap request doesn't show any labels

Sorry if this mails comes with differents issues, we can split it on several
different thread if needed.

Regards,

Y.

--
Responsable Formation et Support
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel (France) : +33 4 79 26 57 98
Tel (Suisse) : 021 619 10 43
Mob. : +33 6 18 75 42 21
Fax : 04 79 70 15 81

Mail : yves.jaco...@camptocamp.commailto:yves.jaco...@camptocamp.com
http://www.camptocamp.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Beginning MapServer User needs help

2014-04-24 Thread Rahkonen Jukka (Tike)
Hi,

I am willing to help but I would rather do it in some other way than trying to 
make that tutorial to work. For my mind it has been a good start as a tutorial 
but it has never been ready enough to be given for the beginners and now it is 
also outdated.
- Mapfile is not valid because it does not start with the magic word MAP
- Mapfile is using deprecated LAYER-CLASS while the current way it to have 
LAYER-CLASS-STYLE
- The mapfile is unnecessary simple. It would be better to learn users to use 
projection blocks everywhere.
- It would be more clear to use absolute paths instead of relative to shapepath
- It should contain MS_ERRORFILE and #DEBUG 5 set plus an instruction to remove 
# in case of troubles and have a look at the errorfile.

I think also that it would be better for the beginners to make a WMS service 
instead of using html templates and use QGIS or a web browser with handwritten 
WMS GetMap call as the first client. Page 
http://mapserver.org/ogc/wms_server.html is of much better reading but 
naturally it would be nice to get a map out of Mapserver with minimal work. It 
would make new users to believe that Mapserver really works. If we had an 
official installer for Mapserver it could come with a few small datasets and 
ready made mapfiles so that users would have something that works 
out-of-the-box after installation. Nightly/weekly or at least monthly builds 
would be welcome.

I am not sure if this soon 3 years old tutorial still works but you can have a 
try http://latuviitta.org/documents/Super_easy_WMS_server.pdf


-Jukka Rahkonen-




Deborah Traver

 Is anyone willing to help me figure out my issues? I am doing a tutorial on 
 gistutor.com/mapserverhttp://www.gistutor.com/mapserver/3-beginner-mapserver-tutorials/7-how-to-generate-a-simple-map-using-mapserver-and-a-shapefile.html,
  and have followed it to the tee. I am a ms4w user. Mapserver and apache are 
 installed correctly. I imagine I am making a small mistake somewhere in my 
 MapFile /or html. I tried sending a more detailed email, but it was too 
 large to send. I can send more info to anyone that has a few minutes for me.

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

Re: [mapserver-users] Exclude one layer's class from GetLegendGraphics

2014-04-10 Thread Rahkonen Jukka (Tike)
Hi,

For the first question I am remembering that only classes with NAME go to the 
legend. I may be wrong but you can try it easily.

-Jukka Rahkonen-


gorank wrote:
 
 Actually i have to questions:
 
 1). I have mapfile with few layers. In one layer I have 5 classes with 
 expresions.
 When show legend with GetLegendGraphics always all 5 classes are shown
 although one class is empty (for instance class expression is ([2011] = 0) 
 and in
 the shapefile attributes there is no value 0).
 
 My question is how to exclude class from the legend. I tried with STATUS OFF 
 in
 the CLASS but do not work.
 
 2). I use cyrilic font for polygon labels and for legend titles. When I put 
 class title
 with unicode and save mapfile as unicode, OpenLayers app show empty map in
 the browser. When I put latin text and sava mapfile as ASCII the same map is
 shown in the browser. What i am missing.
 
 Example from the mapfile.
 CLASS
   NAME klasa_1
   EXPRESSION ([2011]  0 and [2011]  5)
   LABEL
 FONT arial
 SIZE 8
 ENCODING UTF-8
 OFFSET 0 0
 POSITION CC
 SHADOWSIZE 1 1
 TYPE TRUETYPE
   END # LABEL
   STYLE
 COLOR 255 255 128
 OUTLINECOLOR 130 130 130
 WIDTH 0.5
   END # STYLE
   TITLE 4.9 or less
 END # CLASS
 CLASS
   NAME klasa_2
   EXPRESSION ([2011] = 5 and [2011]  10)
   LABEL
 FONT arial
 SIZE 8
 ENCODING UTF-8
 OFFSET 0 0
 POSITION CC
 SHADOWSIZE 1 1
 TYPE TRUETYPE
   END # LABEL
   STYLE
 COLOR 250 209 85
 OUTLINECOLOR 130 130 130
 WIDTH 0.5
   END # STYLE
   TITLE 5.0 - 9.9
 END # CLASS
 CLASS
   NAME klasa_3
   EXPRESSION ([2011] =10 and [2011]  15)
   LABEL
 FONT arial
 SIZE 8
 ENCODING UTF-8
 OFFSET 0 0
 POSITION CC
 SHADOWSIZE 1 1
 TYPE TRUETYPE
   END # LABEL
   STYLE
 COLOR 242 167 46
 OUTLINECOLOR 130 130 130
 WIDTH 0.5
   END # STYLE
   TITLE 10.0 - 14.9
 END # CLASS
 CLASS
   NAME klasa_4
   EXPRESSION ([2011] = 15 and [2011]  20)
   LABEL
 FONT arial
 SIZE 8
 ENCODING UTF-8
 OFFSET 0 0
 POSITION CC
 SHADOWSIZE 1 1
 TYPE TRUETYPE
   END # LABEL
   STYLE
 COLOR 173 83 19
 OUTLINECOLOR 130 130 130
 WIDTH 0.5
   END # STYLE
   TITLE 15.0 - 19.9
 END # CLASS
 CLASS
   NAME klasa_5
   EXPRESSION ([2011] = 20 and [2011]  1)
   LABEL
 FONT arial
 SIZE 8
 ENCODING UTF-8
 OFFSET 0 0
 POSITION CC
 SHADOWSIZE 1 1
 TYPE TRUETYPE
   END # LABEL
   STYLE
 COLOR 107 0 0
 OUTLINECOLOR 130 130 130
 WIDTH 0.5
   END # STYLE
   TITLE 20 and more
 END # CLASS
 CLASS
   STATUS ON
   NAME klasa_0
   EXPRESSION ([2011] = 10)
   LABEL
 FONT arial
 SIZE 8
 ENCODING UTF-8
 OFFSET 0 0
 POSITION CC
 SHADOWSIZE 1 1
 TYPE TRUETYPE
   END # LABEL
   STYLE
 COLOR 100 100 100
 OUTLINECOLOR 130 130 130
 WIDTH 0.5
   END # STYLE
   TITLE no event
 END # CLASS
 CLASS
   STATUS OFF
   NAME klasa_00
   EXPRESSION ([2011] = 1)
   LABEL
 FONT arial
 SIZE 8
 ENCODING UTF-8
 OFFSET 0 0
 POSITION CC
 SHADOWSIZE 1 1
 TYPE TRUETYPE
   END # LABEL
   STYLE
 COLOR 200 200 200
 OUTLINECOLOR 130 130 130
 WIDTH 0.5
   END # STYLE
   TITLE no event1
 END # CLASS
 
 
 
 --
 View this message in context: http://osgeo-org.1560.x6.nabble.com/Exclude-
 one-layer-s-class-from-GetLegendGraphics-tp5134193.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] [mapserver-dev] Postgis, WFS and 3D coordinates

2014-04-04 Thread Rahkonen Jukka (Tike)
Hi,

I wonder why nobody seems to remember that we have TinyOWS in the family too? I 
made a test layer for you, try it

http://hip.latuviitta.org/cgi-bin/tinyows?service=wfsversion=1.1.0request=GetFeaturetypename=lv:swamp_3d_testmaxFeatures=10

I CC:ed MapServer users list because this is something that might interest also 
users, not only developers.

-Jukka Rahkonen-


Guillaume Sueur wrote:
 
 Hi Thomas,
 
 Thanks for your concern.
 Do you mean I just have to use PROCESSING FORCE2D=off ?
 That's worth a pint of Guinness !
 
 Best regards
 
 Le 04/04/2014 14:21, thomas bonfort a écrit :
  Guillaume,
  You have a bit of background here:
  https://github.com/mapserver/mapserver/pull/4803
 
  On 4 April 2014 13:14, Guillaume Sueur no-re...@neogeo-online.net wrote:
  Hi list,
 
  Using WFS against a Postgis layer made me realize that all the
  requests to Postgis were made with the ST_Force2D function, which
  makes it impossible to retrieve 3D coordinates on the client side.
  Can the use of ST_Force2D be avoided in case uf WFS ?
 
  Best regards
 
  Guillaume SUEUR
  ___
  mapserver-dev mailing list
  mapserver-...@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
 
 ___
 mapserver-dev mailing list
 mapserver-...@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-dev
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS Server Optimization?

2014-04-03 Thread Rahkonen Jukka (Tike)
Hi,

AutoCAD is making funny requests: same BBOX but four different image size. 
Probably it is building a local cache from the maps for making zooming and 
panning fluent later, and perhaps it wants to fetch a high resolution image so 
that it can create better quality printouts.  Anyway, the second and biggest 
request seems to timeout. You can of course increase the timeout of Apache 
server, but much better option is to make your service faster. Convert your 
images into tiled geotiffs with overviews and you will make both AutoCAD and 
users happy.  Well, at least I guess so. 

-Jukka Rahkonen-

gom wrote:
 
 Thanks for all the tips.  I checked the logs and this is what I found.
 
 The following 4 requests are sent to the server when AutoCAD connects to the
 server.  The 1st, 3rd and 4th requests all execute almost instantly when 
 pasted
 into the browser command line.  The second statement runs for about
 70 seconds and returns a
 
 *Gateway Timeout*.
 The gateway did not receive a timely response from the upstream server or
 application.
 
 192.168.0.21 - - [03/Apr/2014:09:53:54 -0600] GET /cgi-
 bin/mapserv.exe?map=/mapserv/images/images.mapversion=1.3.0service=
 WMSREQUEST=GetMapEXCEPTIONS=XMLLAYERS=RasterSampleSTYLES=
 CRS=EPSG:26910SRS=EPSG:26910FORMAT=image/png;
 mode=8bitBBOX=496500.00,6234300.00,597000.00,6401200.0
 0HEIGHT=256WIDTH=154TRANSPARENT=TRUE
 HTTP/1.1 200 113
 
 192.168.0.21 - - [03/Apr/2014:09:53:54 -0600] GET /cgi-
 bin/mapserv.exe?map=/mapserv/images/images.mapversion=1.3.0service=
 WMSREQUEST=GetMapEXCEPTIONS=XMLLAYERS=RasterSampleSTYLES=
 CRS=EPSG:26910SRS=EPSG:26910FORMAT=image/png;
 mode=8bitBBOX=496500.00,6234300.00,597000.00,6401200.0
 0HEIGHT=1024WIDTH=616TRANSPARENT=TRUE
 HTTP/1.1 504 247
 
 192.168.0.21 - - [03/Apr/2014:09:54:59 -0600] GET /cgi-
 bin/mapserv.exe?map=/mapserv/images/images.mapversion=1.3.0service=
 WMSREQUEST=GetMapEXCEPTIONS=XMLLAYERS=RasterSampleSTYLES=
 CRS=EPSG:26910SRS=EPSG:26910FORMAT=image/png;
 mode=8bitBBOX=496500.00,6234300.00,597000.00,6401200.0
 0HEIGHT=921WIDTH=554TRANSPARENT=TRUE
 HTTP/1.1 200 171
 
 192.168.0.21 - - [03/Apr/2014:09:55:01 -0600] GET /cgi-
 bin/mapserv.exe?map=/mapserv/images/images.mapversion=1.3.0service=
 WMSREQUEST=GetMapEXCEPTIONS=XMLLAYERS=RasterSampleSTYLES=
 CRS=EPSG:26910SRS=EPSG:26910FORMAT=image/png;
 mode=8bitBBOX=496500.00,6234300.00,597000.00,6401200.0
 0HEIGHT=761WIDTH=458TRANSPARENT=TRUE
 HTTP/1.1 200 151
 
 To fill out details asked by others.
 
 I have tried AutoCAD Map on two different machines. Windows 7, 64 bit Map
 2012 and 2014. Same results.
 
 The server is Windows 2008 R2, 64 bit running latest Mapserver from
 GISInternals on apache 2.4.7
 
 
 
 --
 View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-
 Server-Optimization-tp5132723p5132918.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS Server Optimization?

2014-04-02 Thread Rahkonen Jukka (Tike)
Hi,

Check from the Apache access.log what kind of WMS requests AutoCad is sending.  
That should give a hint about how it is so heavy.

Png format is about the worst of all for server usage because the whole image 
data must be decompressed for each request. You will find easily recipes for 
creating tiled and perhaps compressed tiffs with overviews for Mapserver from 
the mail archives.

-Jukka Rahkonen-

gom wrote:

 
 I have created a Mapserver site and published a couple of large raster layers
 through WMS.  They work as expected and perform quiite well.
 
 When i add the wms layers to Gaia or to Global Mapper they add and display
 great.  I want to display the layers in AutoCAD Map.  When I add the WMS layer
 there it takes 1.5 to 3 minutes to add the layer.  After that it works fine.  
 No
 other WMS layers behave like that in AutoCAD Map and as I mentioned
 previously, the layers don't work like that in any other program.
 
 The layers are made up of about 1600 PNG images that are referenced in the
 .map file by tileindexes.  One layer is at 2 metre pixels and the other at 5 
 metre
 pixels.  If I remove the layer that references the 2 metre images and only 
 use the
 5 metre images, the layer is attached quite quickly.  If I switch and use 
 only the 2
 metre image layer the speed is slow again.
 
 My output format is PNG8.
 The images are stored in the same projection as they are being queried.
 I have added the wms_extents metadata to each layer.
 The MAXGEOWIDTH is such that no data is queried on inital loading of the 
 layer.
 
 I have asked the question in the AutoCAD support forums, from the AutoCAD
 MAp perspective, but was hoping there might be some suggestions as to
 configuration/map options, in Mapserver, that might help speed up this
 operation.
 
 Thanks
 
 
 
 --
 View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-
 Server-Optimization-tp5132723.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Processing JP2000 files

2014-03-31 Thread Rahkonen Jukka (Tike)
Hi,

I can also have a look if you can put original, gray scale creater by Kakadu 
and the one created with GM somewhere for downloading. Private message is OK, I 
can mail my findings back to the list.

-Jukka Rahkonen-

EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE wrote:
 
 Hi Jukka,
 This has certainly been entertaining.  I grabbed kakadu, and it could convert 
 the
 images from jp2000 to jp2000 in about 5 seconds.  The speed was impressive.
 Unfortunately, probably due to my limited jp2000 experience, kakadu sees the
 image as gray scale only.  When I export the image to another jp2000, my
 mapserver can process it just fine, but it's only in gray scale.  I then 
 tried Global
 Mapper scripting.  It exports the jp2 image to jp2 in about 30 seconds, but
 retains the color.  Plus, the file size is reduce about a third.  
 Fortunately, I can
 run about 3 of these scripts at once on a machine, and still write them out 
 ever
 30 seconds or so, so I'm averaging about 1 file ever 10 seconds.  I've got 3
 machines working on this so it should take about a week or two to convert the
 whole set.  If I try to open one of the new jp2 files produced by GM in 
 kakadu, it
 complains that there is something illegal in the header, but then does 
 display the
 image and it looks just fine.  I'm not sure what encoder the USDA is using to
 produce these files, but hopefully they get an update before we have to get
 more files from them.
 Thanks,
 James
 
 
 
 
 From: Rahkonen Jukka  (Tike) [jukka.rahko...@mmmtike.fi]
 Sent: Friday, March 21, 2014 7:53 AM
 To: EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE; 'mapserver-
 us...@lists.osgeo.org'
 Subject: Re: [mapserver-users] Processing JP2000 files
 
 Hi James,
 
 It has been a while since I have done any experiments with JPEG2000 and
 stopwatch but I happened to have a rather recent versions of Kakadu demo
 executables on my machine (version 7.3.2, the very latest is 7.3.3).  We do 
 not
 have a license for the Kakadu speed pack, but even without it the conversion
 from lossless JPEG2000 into lossless GeoTIFF feels quite speedy. Here comes 
 the
 facts:
 
 Hardware is a Windows 7 laptop with Intel i7, 8 cores and 8 GB RAM.
 Test image is 12000 x 12000 pixel 3-band aerial image, 443 MB as
 uncompressed, 170 MB as lossless JPEG2000 Here is the kdu_expand command
 and conversion log:
 
 Kakadu_732\bin_x64\kdu_expand -i test_in.JP2  -o test_out.tif -cpu 0 -mem
 Copying Geo  box info, size = 389
 End-to-end CPU time = 6.317000 seconds (0.014623 us/sample)
 
 Consumed 8 tile-part(s) from a total of 1 tile(s).
 Consumed 174,371,002 codestream bytes (excluding any file format) = 9.687278
 bits/pel. Processed using the multi-threaded environment, with 8 parallel
 threads of execution
 
 Native Kakadu application used only 6.3 seconds CPU time for this task.   I 
 also
 made a comparison with GDAL 64-bit with driver
 JP2ECW (rov): ERDAS JPEG2000 (SDK 5.0)
 End-to-end time including disk write was 21 second. Kadudu timing was 6.3
 seconds but I took timing also to include disk write and it was still under 7
 seconds. It may be that file system was still doing some delayed writing but 
 the
 scale should be about right.
 My test image was compressed as one tile and JP2OpenJPEG driver could not
 convert it.
 
 Final comparison: gdal_translate from uncompressed tif to uncompressed tif: 3
 seconds.
 
 TIFF to TIFF with GDAL: 3 seconds
 JP2 to TIFF with native Kakadu: 7 seconds
 JP2 to TIFF with GDAL ECWJP2 (SDK 5.0): 21 seconds
 
 Your Global Mapper timing with much smaller image was 3 minutes. You have
 40 files...
 
 -Jukka Rahkonen-
 
 
 
 
  -Alkuperäinen viesti-
  Lähettäjä: EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE
  [mailto:james.evan...@us.af.mil]
  Lähetetty: 21. maaliskuuta 2014 14:22
  Vastaanottaja: Rahkonen Jukka (Tike); 'mapserver-users@lists.osgeo.org'
  Aihe: RE: [mapserver-users] Processing JP2000 files
 
  Hi Jukka,
  I have Global Mapper, and used it to do a batch convert to geotiff on
  a test set of images.  The converted files work fine with the OpenJPEG
  drive, but the size almost doubles and on my 10 year old pc at home it
  takes about 3 minutes per file to convert.  I will look at all the options 
  you
 mentioned below.
  Thanks!
  James
 
 
 
  
  From: Rahkonen Jukka  (Tike) [jukka.rahko...@mmmtike.fi]
  Sent: Friday, March 21, 2014 3:33 AM
  To: EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE; 'mapserver-
  us...@lists.osgeo.org'
  Subject: Re: [mapserver-users] Processing JP2000 files
 
  Hi,
 
  From your other mail I concluded that your images are converted into
  JPEG2000 with some Lizardtech product so it is not a surprise that
  MrSID/MrSIG JPEG2000 driver is happy with the SOT markers. I do not
  know if it is a real error in file structure or only a different
  JPEG2000 dialect. JPEG2000 is very feature rich and complicated.
 
  It seems that OpenJPEG driver

Re: [mapserver-users] Processing JP2000 files

2014-03-21 Thread Rahkonen Jukka (Tike)
Hi,

From your other mail I concluded that your images are converted into JPEG2000 
with some Lizardtech product so it is not a surprise that MrSID/MrSIG JPEG2000 
driver is happy with the SOT markers. I do not know if it is a real error in 
file structure or only a different JPEG2000 dialect. JPEG2000 is very feature 
rich and complicated.

It seems that OpenJPEG driver is not most happy with the JPEG2000 structure in 
your images. It could be happier if the data streams inside JP2 file were 
organized in some other way. There are tools (for example Kakadu kdu_transcode) 
for re-organizing JPEG2000 files without recompression and data loss but that 
would still mean a rewrite for all your images. OpenJPEG is as its best is 
rather fast and almost usable for production but it depends on how much load 
you wait for your server. However, myself I would not follow that route. I 
would consider two alternatives:

- Acquire Mapserver + GDAL with some fast JPEG2000 driver:  JPKAK, JP2ECW, or 
JP2MrSID. Test with your images and take care of a license. Those SDKs are not 
free and you can't use them on server without paying. 
- Convert your images into GeoTIFF format (tiled, jpeg compressed, with 
compressed overviews). You need a fast JPEG200O driver also for that but for 
example JP2ECW license allows desktop use without payed license (check it!). 
Conversion will take some time because there are 1440 minutes in a day and you 
said you have 40 images. With one computer it would take several months so 
I suggest to gather lots of computers and lots of USB drives so that you can 
read from one drive and write converted images into another. There is lots of 
computing power around nowadays and from any medium scaled office you can find 
100 laptops which are idle for all nights and weekends. They could handle your 
data within a week or two. GeoTIFFs will take a bit more disk space mainly 
because of overviews (JPEG2000 streams are progressive and overviews are 
unnecessary) but they will be faster with your Mapserver and other GDAL based 
software like QGIS and with Geoserver too.

-Jukka Rahkonen-

EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE wrote:
 
 Hi Jukka,
 
 The MS4W version says it is using Driver: JP2MrSID/MrSID JPEG2000, and the
 GISInternals version is using Driver: JP2OpenJPEG/JPEG-2000 driver based on
 OpenJPEG library.  I tried to do a gdal_translate on the same file, using the 
 each
 of the drivers.  They both translated the file into a 512x512 jpg, but the
 JP2OpenJPEG driver listed over a 1000 of these warnings before it stopped 
 listing
 warnings:
 Warning 1: Empty SOT marker detected: Psot=12.
 
 So, I have 400,000 of these JP2000 images, equally 4.3TBs of data.  Should I
 consider a massive batch conversion to JPG or Geotiff, or is there some way to
 get the JP2OpenJPEG driver to play nice with these files?
 
 Thanks,
 James
 
 From: Rahkonen Jukka  (Tike) [jukka.rahko...@mmmtike.fi]
 Sent: Thursday, March 20, 2014 7:44 AM
 To: EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE; mapserver-
 us...@lists.osgeo.org
 Subject: VS: [mapserver-users] Processing JP2000 files
 
 Hi,
 
 Are your JPEG2000 images the same?  SOT marker is JPEG2000 stuff and it
 means start of tilepart.  If images are the same then the message means that
 something has changed in GDAL part. GDAL has several JPEG200 drivers and they
 all behave in a bit different way. Check which driver you have in your old 
 system
 and which one you have now with gdalinfo --formats.
 I warn that from the free alternatives only OpenJPEG driver is something that
 can be considered for real use.
 
 -Jukka Rahkonen-
 
 
 
 James_in_Utah wrote:
 
  There must have been something wrong with my shapefile, because I
  tried this at home and I was able to get the same data to work.  Now
  the problem is that the image I see on my client is all washed out,
  not a variant RGB image but mostly brownish with weak greens.  None of
  the reds or blues are making it through.  Plus, where the tiles
  overlap I can see the edges are blended from the overlapping tiles.
  This wasn't the case with the older GDAL from MS4W.  Has something
 changed?  Is there some directive in the layer that I'm missing?
  Thanks,
  James
 
 
 
 
  --
  View this message in context: http://osgeo-
  org.1560.x6.nabble.com/Processing-JP2000-files-tp5129997p5130136.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Processing JP2000 files

2014-03-21 Thread Rahkonen Jukka (Tike)
Hi James,

It has been a while since I have done any experiments with JPEG2000 and 
stopwatch but I happened to have a rather recent versions of Kakadu demo 
executables on my machine (version 7.3.2, the very latest is 7.3.3).  We do not 
have a license for the Kakadu speed pack, but even without it the conversion 
from lossless JPEG2000 into lossless GeoTIFF feels quite speedy. Here comes the 
facts:
 
Hardware is a Windows 7 laptop with Intel i7, 8 cores and 8 GB RAM.
Test image is 12000 x 12000 pixel 3-band aerial image, 443 MB as uncompressed, 
170 MB as lossless JPEG2000
Here is the kdu_expand command and conversion log:
 
Kakadu_732\bin_x64\kdu_expand -i test_in.JP2  -o test_out.tif -cpu 0 -mem
Copying Geo  box info, size = 389
End-to-end CPU time = 6.317000 seconds (0.014623 us/sample)

Consumed 8 tile-part(s) from a total of 1 tile(s).
Consumed 174,371,002 codestream bytes (excluding any file format) = 9.687278
bits/pel. Processed using the multi-threaded environment, with 8 parallel 
threads of execution

Native Kakadu application used only 6.3 seconds CPU time for this task.   I 
also made a comparison with GDAL 64-bit with driver
JP2ECW (rov): ERDAS JPEG2000 (SDK 5.0)
End-to-end time including disk write was 21 second. Kadudu timing was 6.3 
seconds but I took timing also to include disk write and it was still under 7 
seconds. It may be that file system was still doing some delayed writing but 
the scale should be about right.
My test image was compressed as one tile and JP2OpenJPEG driver could not 
convert it.

Final comparison: gdal_translate from uncompressed tif to uncompressed tif: 3 
seconds.

TIFF to TIFF with GDAL: 3 seconds
JP2 to TIFF with native Kakadu: 7 seconds
JP2 to TIFF with GDAL ECWJP2 (SDK 5.0): 21 seconds

Your Global Mapper timing with much smaller image was 3 minutes. You have 
40 files... 

-Jukka Rahkonen-




 -Alkuperäinen viesti-
 Lähettäjä: EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE
 [mailto:james.evan...@us.af.mil]
 Lähetetty: 21. maaliskuuta 2014 14:22
 Vastaanottaja: Rahkonen Jukka (Tike); 'mapserver-users@lists.osgeo.org'
 Aihe: RE: [mapserver-users] Processing JP2000 files
 
 Hi Jukka,
 I have Global Mapper, and used it to do a batch convert to geotiff on a test 
 set
 of images.  The converted files work fine with the OpenJPEG drive, but the 
 size
 almost doubles and on my 10 year old pc at home it takes about 3 minutes per
 file to convert.  I will look at all the options you mentioned below.
 Thanks!
 James
 
 
 
 
 From: Rahkonen Jukka  (Tike) [jukka.rahko...@mmmtike.fi]
 Sent: Friday, March 21, 2014 3:33 AM
 To: EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE; 'mapserver-
 us...@lists.osgeo.org'
 Subject: Re: [mapserver-users] Processing JP2000 files
 
 Hi,
 
 From your other mail I concluded that your images are converted into JPEG2000
 with some Lizardtech product so it is not a surprise that MrSID/MrSIG JPEG2000
 driver is happy with the SOT markers. I do not know if it is a real error in 
 file
 structure or only a different JPEG2000 dialect. JPEG2000 is very feature rich 
 and
 complicated.
 
 It seems that OpenJPEG driver is not most happy with the JPEG2000 structure in
 your images. It could be happier if the data streams inside JP2 file were
 organized in some other way. There are tools (for example Kakadu
 kdu_transcode) for re-organizing JPEG2000 files without recompression and
 data loss but that would still mean a rewrite for all your images. OpenJPEG 
 is as
 its best is rather fast and almost usable for production but it depends on how
 much load you wait for your server. However, myself I would not follow that
 route. I would consider two alternatives:
 
 - Acquire Mapserver + GDAL with some fast JPEG2000 driver:  JPKAK, JP2ECW, or
 JP2MrSID. Test with your images and take care of a license. Those SDKs are not
 free and you can't use them on server without paying.
 - Convert your images into GeoTIFF format (tiled, jpeg compressed, with
 compressed overviews). You need a fast JPEG200O driver also for that but for
 example JP2ECW license allows desktop use without payed license (check it!).
 Conversion will take some time because there are 1440 minutes in a day and you
 said you have 40 images. With one computer it would take several months
 so I suggest to gather lots of computers and lots of USB drives so that you 
 can
 read from one drive and write converted images into another. There is lots of
 computing power around nowadays and from any medium scaled office you can
 find 100 laptops which are idle for all nights and weekends. They could handle
 your data within a week or two. GeoTIFFs will take a bit more disk space 
 mainly
 because of overviews (JPEG2000 streams are progressive and overviews are
 unnecessary) but they will be faster with your Mapserver and other GDAL based
 software like QGIS and with Geoserver too.
 
 -Jukka Rahkonen-
 
 EVANS, JAMES R GS-13 USAF ACC 84 RADES

Re: [mapserver-users] Converting PDF files to GeoTiff

2014-03-21 Thread Rahkonen Jukka (Tike)
Hi,

GDAL of course.

C:\data\tempgdal_translate -of GTiff -co tiled=yes 
ny_west point_140214_1941_62500_geo.pdf geotiff_out.tif

Conversion takes a few seconds only.

-Jukka Rahkonen-

Mike Flannigan wrote:

 
 
 On a perhaps related subject, I was wondering if there was a preferred way to
 convert PDF map files to georeferenced GeoTiffs?  I have thousands (many
 thousands) of these to convert.
 
 The tools I would like to use in order of preference are:
 Perl
 QGIS
 Any open source software
 Global Mapper
 
 
 I am on Win7.
 
 Here is an example of a file I want to convert:
 http://www.mflan.com/temp/ny_west point_140214_1941_62500_geo.pdf
 
 I am also not adverse to downloading the entire country (USA) of GeoTiff 15
 minute topos if they exist somewhere, but I have not found a location that
 serves them up for free.
 
 
 Mike
 Houston, TX
 
 
 On 3/21/2014 8:53 AM, mapserver-users-requ...@lists.osgeo.org wrote:
  Date: Fri, 21 Mar 2014 12:21:30 +
  From: EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE
  james.evan...@us.af.mil
  To: Rahkonen Jukka  (Tike)jukka.rahko...@mmmtike.fi,
  'mapserver-users@lists.osgeo.org'
  mapserver-users@lists.osgeo.org
  Subject: Re: [mapserver-users] Processing JP2000 files
  Message-ID:
 
  20EA793B1BC710448656BDC9BD25C4A104C5B771@52ZHTX-D07-
 04D.area52.afnoap
  ps.usaf.mil
 
  Content-Type: text/plain; charset=us-ascii
 
  Hi Jukka,
  I have Global Mapper, and used it to do a batch convert to geotiff on a 
  test set
 of images.  The converted files work fine with the OpenJPEG drive, but the 
 size
 almost doubles and on my 10 year old pc at home it takes about 3 minutes per
 file to convert.  I will look at all the options you mentioned below.
  Thanks!
  James

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


Re: [mapserver-users] Processing JP2000 files

2014-03-20 Thread Rahkonen Jukka (Tike)
Hi,

Are your JPEG2000 images the same?  SOT marker is JPEG2000 stuff and it means 
start of tilepart.  If images are the same then the message means that 
something has changed in GDAL part. GDAL has several JPEG200 drivers and they 
all behave in a bit different way. Check which driver you have in your old 
system and which one you have now with gdalinfo --formats. 
I warn that from the free alternatives only OpenJPEG driver is something that 
can be considered for real use.

-Jukka Rahkonen-



James_in_Utah wrote:

 There must have been something wrong with my shapefile, because I tried this
 at home and I was able to get the same data to work.  Now the problem is that
 the image I see on my client is all washed out, not a variant RGB image but
 mostly brownish with weak greens.  None of the reds or blues are making it
 through.  Plus, where the tiles overlap I can see the edges are blended from 
 the
 overlapping tiles.  This wasn't the case with the older GDAL from MS4W.  Has
 something changed?  Is there some directive in the layer that I'm missing?
 Thanks,
 James
 
 
 
 
 --
 View this message in context: http://osgeo-
 org.1560.x6.nabble.com/Processing-JP2000-files-tp5129997p5130136.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Migrating from MS4W to GISInternals

2014-03-17 Thread Rahkonen Jukka (Tike)
Hi,

By looking at the Apache httpd.cong from MS4W I can see these two
# set GDAL_DATA environment variable to location of supporting gdal files
SetEnv GDAL_DATA /ms4w/gdaldata

# set GDAL_DRIVER_PATH environment variable for gdal plugins
SetEnv GDAL_DRIVER_PATH /ms4w/gdalplugins

Perhaps you should also set GDAL_DATA and GDAL_DRIVER_PATH?

-Jukka Rahkonen-


EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE wrote:


Hi Tamas,
Still no luck getting it working.  hdf5.dll, hdf5_hl.dll, and hdfdll.dll were 
not in the mapsrver directtory.   I copied them over.  Still no luck displaying 
the raster data.  There several other dlls in the bin directory of the zip that 
are not in the mapserver directory.  THey include:
freexl.dll
ftgl.dll
libecwj2.dll
libtiff.dll
lti_dsdk_9.0.dll
lti_lidar_dsdk_1.1.dll
mfhdfdll.dll
msplugin_mssql2008.dll
msplugin_oracle.dll
msvcp100.dll
msvcr100.dll
NCSEcw.dll
szip.dll
tbb.dll
xdrdll.dll

Should any of these also be copied over to the mapserver directory?
Thanks,
James


From: Tamas Szekeres [szeker...@gmail.com]
Sent: Sunday, March 16, 2014 6:52 AM
To: EVANS, JAMES R GS-13 USAF ACC 84 RADES/SCZE
Cc: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Migrating from MS4W to GISInternals
I suspect hdf5.dll and hdf5_hl.dll is still missing on your target directory. 
Copy those files from the .zip package mentioned before.

Tamas


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

Re: [mapserver-users] join shp with csv

2014-03-13 Thread Rahkonen Jukka (Tike)
Hi,

Could you send the whole LAYER section? And if you can put a small shapefile to 
download I can have a try.
About ogrinfo, your command is searching for layer lookup from csv file 
join.csc. It does not have such layer, it has exactly one layer and it is 
join. So do
ogrinfo join.csv join -summary

This is not your fault, obviously the one who wrote the documentation remembers 
all the GDAL commands with eyes shut but author did not remember that 
documentation is meant for wider audience. I would have written the command 
without layer name but used the generally working switch -al (all layers) 
instead.
 
ogrinfo -al -so lookup.csv

-Jukka Rahkonen-


Jörg Thomsen wrote:


 
 hi again,
 
 I am still preparing my MapServer workshop for FOSGISS in Berlin next week.
 Last topic is a join-example and I cannot get it to work :(
 
 this is my join in the layer:
JOIN
  NAME test
  CONNECTIONTYPE CSV
  TABLE ./shapes_join/join.csv
  FROM osm_id
  TO 1
  #TO 0
  #TO tab_1
  #TO osm_id
  TYPE ONE-TO-ONE
END
 
 the first lines of the csv:
  osm_id;name_join
  21484050;Karlshorst
  21484076;Schmöckwitz
  21484102;Adlershof
  27380127;Bohnsdorf
  28094136;Schöneberg
 
 and here is the featureonfo-output:
 GetFeatureInfo results:
 
 Layer 'places'
   Feature 137:
 osm_id = '560483810'
 name = 'Neu-Hohenschönhausen'
 type = 'suburb'
 population = '''
 
 no 'name_join' :(
 
 tried upper und lower cases for column-names
 
 funny: the only output in errorlog (level5) is:
  [Thu Mar 13 10:48:52 2014].209278 msSearchDiskTree(): Search returned no
 results. Unable to open spatial index for
 /home/user/data/mapserverIIWS/./shapes_join/places_join.qix. In most cases
 you can safely ignore this message, otherwise check file names and 
 permissions.
  [Thu Mar 13 10:48:52 2014].209678 freeLayer(): freeing layer at 0x9451cd8.
 'Search returned no results.' but there are results
 
 
 $ ogrinfo join.csv lookup -summary
  INFO: Open of `join.csv'
using driver `CSV' successful.
  FAILURE: Couldn't fetch requested layer lookup!
 
 This is my only hint but unfortunatly I don't know what ogr wants to tell me.
 
 regards, Jörg
 
 
 --
 ~~~
 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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Layer with point from X and Y columns in

2014-03-13 Thread Rahkonen Jukka (Tike)
Hi,

There is another way by using a GDAL virtual format 
http://www.gdal.org/ogr/drv_vrt.html.
But it does not really make much sense to have a spatial table in Oracle that 
is to be used for rendering maps without having a spatial index. Without 
spatial index the BBOX of the map cannot be converted into working spatial 
query from Oracle. The best you can obtain would lead to selecting the whole 
table for each pan or zoom. So I suggest you to put all your effort into 
contacting a manager in a high enough position and tell that the spatial index 
is absolutely needed. And when the manager puts the db admins into work, they 
can at the same time add triggers to populate the SDO_GEOMETRY fields 
automatically from X and Y columns after each insert and update. If you do it 
right, your manager believes that it was his/her idea and everything goes 
fluently and yields much better result than any workaround.

-Jukka Rahkonen-




Jakub Štambachr


Hi,

I have table in Oracle Database that contains points specified by columns X and 
Y (The table also contains SDO_Geometry column but it's not always filled with 
data and I'm not at liberty to modify the table).

My question is: Is it possible to specify layers with point using the columns X 
and Y?

So far I have something like this and I need an alternative to replace the DATA

TYPE POINT
CONNECTIONTYPE oraclespatial

CONNECTION isypoo/password@orcl
DATA shape FROM (select table.shape as SHAPE from table)

I tried the following:

DATA shape FROM (select MDSYS.SDO_GEOMETRY(2001, NULL, 
MDSYS.SDO_POINT_TYPE(table.x, table.Y, NULL), NULL, NULL) AS shape from table)

But got the following error:

msDrawMap(): Image handling error. Failed to draw layer named 'mosty'.
msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-13226: 
interface not supported without a spatial index

Is there any other way of doing this without modifying the database?

Thank you for your help,

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

Re: [mapserver-users] join shp with csv

2014-03-13 Thread Rahkonen Jukka (Tike)
Hi,

I have had no time to look at your files but I see that ogrinfo reports osm_id 
as a string. Write .csvt file http://www.gdal.org/ogr/drv_csv.html for 
converting it to integer, perhaps join requires same data types.

-Jukka Rahkonen-

Jörg Thomsen wrote:

 Hello Jeff,
 
 yes, this looks better.
  $ ogrinfo ./shapes_join/join.csv join -summary
  INFO: Open of `./shapes_join/join.csv'
using driver `CSV' successful.
 
  Layer name: join
  Geometry: None
  Feature Count: 208
  Layer SRS WKT:
  (unknown)
  osm_id: String (0.0)
  name_join: String (0.0)
 
 but the join in mapserver still doesn't work.
 
 Jörg
 
 
 Am 13.03.2014 13:39, schrieb Jeff McKenna:
  On 2014-03-13, 9:36 AM, Jeff McKenna wrote:
  On 2014-03-13, 7:07 AM, Jörg Thomsen wrote:
 
 
  $ ogrinfo join.csv lookup -summary
   INFO: Open of `join.csv'
 using driver `CSV' successful.
   FAILURE: Couldn't fetch requested layer lookup!
 
  This is my only hint but unfortunatly I don't know what ogr wants to
  tell me.
 
 
  You seem to be following my examples very closely from
  http://www.mapserver.org/mapfile/join.html#example-3-join-from-shape-
  dataset-to-csv-file which is good, but be careful, lookup in my
  example is the OGR layername; in your case it will be different.  You
  should just try ogrinfo join.csv to get a list of available layers
  through OGR.  See some examples of that in action:
  http://mapserver.org/input/vector/ogr.html#how-to-use-ogrinfo
 
 
  Ah but I almost forgot the most important switch for layernames:
  ogrinfo join.csv -summary
 
  Good luck there!
 
  -jeff
 
 
 
 
 
 ___
 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] Raster Data

2014-03-12 Thread Rahkonen Jukka (Tike)
Hi,

Standard recipe is to use tiled tiff file with overviews, perhaps both 
compressed.
 
Uncompressed:
gdal_translate -of GTiff -co tiled=yes -co bigtiff=yes image.png image.tif
gdaladdo -r average image.tif 2 4 8 16 32 64 128 256

You may want to save space by making a compressed tiff. If it is aerial image, 
use jpeg compression, if a map, then LZW or deflate. For aerials it would look 
about like

gdal_translate -of GTiff  -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES 
image.png image.tif
gdaladdo -r average  --config COMPRESS_OVERVIEW JPEG --config 
PHOTOMETRIC_OVERVIEW YCBCR 2 4 8 16 32 64 128 256

-Jukka Rahkonen-

jcwalz wrote:

 Hello,
 
 I have a png raster image that I am adding to GeoMOOSE and it is about 3GB in
 size. It takes about 10 minutes for the image to show up because the file is 
 so
 large. What is the best way of dealing with large images like this?
 
 Thanks,
 
 Jenna
 
 
 
 --
 View this message in context: http://osgeo-org.1560.x6.nabble.com/Raster-
 Data-tp5128564.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Upgrading Apache and PHP that came with MS4W

2014-02-27 Thread Rahkonen Jukka (Tike)
Hi James,

Nobody answered for you so supposedly that means that the answer is: No, there 
are no documents and probably no compiled Mapcache binaries available for 
Windows. 
I managed to install Apache and Mapserver 6.4.1 from with the OSGeo4W 
installer. Also daily development buids of Mapserver are available but not 
Mapcache. The installed Apache seems to be version 2.2.14-4 and PHP is a bit 
old version 5.2.5 from Nov 8, 2007 so that is not the way for you to upgrade.
However, I have noticed that your conclusion was to  switch to Geoserver. 
Follow the situation, perhaps you can switch back one day but once you have 
configured Geoserver and built all the SLD styles it may feel a bit heavy.

-Jukka Rahkonen-


EVANS, JAMES wrote:

 Hi,
 I'm running the dev version of MS4W with Mapcache.   Our security scans are
 pointing to Apache and PHP that came with MS4W as vulnerabilities.  Our system
 admin tried updating the Apache, but this caused problems with
 mod_mapcache.dll.  Has anyone had any luck upgrading the Apache and PHP
 that came with MS4W without breaking things?  Also, is there a good document
 describing how to deploy the latest Mapserver/Mapcache on a widows server?
 James
 
 ___
 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] layer mask without clipping

2014-02-25 Thread Rahkonen Jukka (Tike)
I think that masked areas would simply appear semi-transparent, not totally 
hidden.

-Jukka Rahkonen-

thomas bonfort wrote:
 
 Lars,
 I don't understand what you're trying to obtain. Can you clarify and/or post a
 couple screenshots?
 
 --
 thomas
 
 On 25 February 2014 09:58, Lars Lingner gislars+l...@googlemail.com wrote:
  Hello,
 
  I really like the MapServer layer mask feature. Is there a way that
  MapServer doesn't clip the mask, instead just setting a opacitiy /
  color value?
 
  I'm getting the result by rendering two passes with mask and inverted
  mask. The latter is using a white opacity layer on top. Afterwards I
  can stack the images together.
  The is working well, as long as there are no labels rendered along the
  mask boundary. If they are, then they are not clipped.
 
  Best wishes,
 
  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
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS image display

2014-02-25 Thread Rahkonen Jukka (Tike)
Hi,

Overviews help at small scales. Let's assume that you have orthophotos with 1 
meter native pixel size. If you want to show a 10x10 km area in a 500x500 pixel 
sized box in your application, it means that the pixel size of the output it 20 
m. It is heavy to read 1x1 native pixels and resample those but if 
there happens to be readily available overviews with 2-4-8-16 m pixel sizes you 
can pick the 16 m pixels and use them for final resampling. 

Tile index is used for finding the right image file at some geographic area. 
And finally internal tiling of image files help at big scales, when you want to 
draw 500x500 m area in the 500x500 pixel sized box. If you have tiled tiff 
files it is possible to pick a handful of 256x256 pixel tiles from the middle 
of the image file. If you have a 1x1 pixel sized png file you must 
decompress all the 100 million pixels before you can pick the 250 thousand that 
you really need.

The key is to read as little extra pixels as possible, and therefore you need 
all three: internal tiling, overviews, and tileindes. Actually for country wide 
service even a fourth one: on overview image that covers the whole country with 
much bigger pixel size so you do not need to open hundreds of images from the 
tileindex for picking only a few pixels from each.

-Jukka Rahkonen-


Dash wrote:

 Our tiff images do not have overviews.  We are thinking that something may
have happened during the transfer of the image from our Windows machine to
Linux machine.  I highly doubt this is the case but it's worth a shot.

 I was just reading about creating overviews.  It seems this would increase
the amount of disk space needed but would it actually increase application
performance?  What is the difference between overviews and creating a tile
index using gdal?

Thanks.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/WMS-image-display-tp5105622p5105896.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mysql Ogr Error

2014-02-16 Thread Rahkonen Jukka (Tike)
Hi,

You wrote some time ago:

 Hi,
 Thanks for the quick reply. I already compiled the mapserver --with-mysql 
 and it seems that its not working as well. How can I fix this issue? 

What did you mean with that? Mapserver reads MySQL through GDAL so you should 
compile GDAL with MySQL and Mapserver with that GDAL. I am sorry if I am lost 
because I do not compile anything myself.
For fixing the issue the first step is to get GDAL with MySQL support. Before 
you have such all other work you do is wasting everybody's time.

I do not believe much in my theory of reserved keyword name but I have 
experienced something like that myself. If something works with v. 5.0 does not 
guarantee that it works as such with v. 6.2.  If, once you have a proper GDAL 
with MySQL and Mapserver with that GDAL, you still face a problem, I would 
recommend to have try escaping name. It means 10 seconds work for you to edit 
your mapfile and try. That is not much wasted time at all even if it had no 
effect at all.

-Jukka Rahkonen-

-Jukka Rahkonen-


rkrojero wrote:
 
 Hi Jukka,
 
 Thanks for the quick response. Regarding the the reserve 'name' its working in
 the old version of mapserver with ogr.. i just upgraded from mapserver
 5.0 to 6.2
 
 I was thinking..
 
 
 is there a gdal/ogr version that supports mysql?
 
 or my recent gdal version dont have a mysql support
 
 
 
 --
 View this message in context: http://osgeo-org.1560.x6.nabble.com/Mysql-Ogr-
 Error-tp5103949p5104023.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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


  1   2   >