Re: [mapserver-users] Style pattern on mapscript

2014-06-17 Thread Umberto Nicoletti
Andrea,
it seems we never got around to properly wrap styleObj.pattern in mapscript.

Actually it is not hard to do it, just provide a getPattern/setPattern
index-based function
in mapscript/swiginc/style.i
and, of course, rebuild mapscript. You could use the get/setBinding
functions as a starting point and I could help you, if you want.

/Umberto



On Tue, Jun 17, 2014 at 3:53 PM, Andrea Peri aperi2...@gmail.com wrote:

 Hi,

 it seem to exist,
 but every sintax I try , I'm have an error.
 like this:

 new_style.pattern = [1.0, 2.0]

 Traceback (most recent call last):
   File generator.py, line 136, in module
 new_style.pattern = [1.0, 2.0]
   File
 C:\my-programs\osgeo4w\apps\Python27\lib\site-packages\mapscript.py, li
 ne 538, in lambda
 __setattr__ = lambda self, name, value: _swig_setattr(self, styleObj,
 name,
 value)
   File
 C:\my-programs\osgeo4w\apps\Python27\lib\site-packages\mapscript.py, li
 ne 48, in _swig_setattr
 return _swig_setattr_nondynamic(self,class_type,name,value,0)
   File
 C:\my-programs\osgeo4w\apps\Python27\lib\site-packages\mapscript.py, li
 ne 41, in _swig_setattr_nondynamic
 if method: return method(self,value)
 TypeError: in method 'styleObj_pattern_set', argument 2 of type 'double
 [MS_MAXP
 ATTERNLENGTH]'

 I don't understand if is a bug or a my wrong on python use ff pattern.

 Unfortunately it seem not documentated at all.

 any help is welcome, thx.

 Andrea.


 2014-06-17 11:42 GMT+02:00 Andrea Peri aperi2...@gmail.com:
  Hi,
 
  Is available the style pattern in mapscript ?
 
  Thx,
 
  --
  -
  Andrea Peri
  . . . . . . . . .
  qwerty àèìòù
  -



 --
 -
 Andrea Peri
 . . . . . . . . .
 qwerty àèìòù
 -
 ___
 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 Feature Order Problem

2014-04-28 Thread Umberto Nicoletti
If you don't have an index yet on TimeStamp, you could try creating one
with an ORDER clause and see if this improves performance (with a properly
created index you can avoid running separate order operation for every
query):

http://technet.microsoft.com/en-us/library/ms181154(v=sql.105).aspx

HTH,
Umberto



On Mon, Apr 28, 2014 at 10:50 AM, geographika geograph...@gmail.com wrote:

  Hi list,

 I recently came across a problem with the order features are rendered by
 Mapserver. I am displaying road surveys done at various times, and have a
 WMS layer that displays the latest survey results. Rather than trying to do
 complicated segmentation, I simply display features ordered by survey date,
 with the most recent records on top.

 Initially my layer DATA clause was similar to the following:

   SELECT ID, GEOM, Rating, YEAR([TimeStamp]) AS [YEAR] from mydata) as tbl
 USING UNIQUE ID USING SRID=29902 ORDER BY [TimeStamp] DESC

 I hadn't realised that anything outside after the USING... statement was
 ignored, so the records were displayed unordered.

 I then tried using:

   SELECT ID, GEOM, Rating, YEAR([TimeStamp]) AS [YEAR] from mydata ORDER
 BY [TimeStamp] DESC) as tbl USING UNIQUE ID USING SRID=29902

 However when the data for the WMS is prepared this SQL becomes a subquery,
 and a WHERE clause is added to get the data for the requested extent.
 SQL Server doesn't allow ORDER BY in a subquery, so an error is thrown:

 The ORDER BY clause is invalid in views, inline functions, derived
 tables, subqueries, and common table expressions, unless TOP or FOR XML is
 also specified.

 My current workaround is to change the SQL to:

   SELECT TOP 100 ID, GEOM, Rating, YEAR([TimeStamp]) AS [YEAR] from
 mydata ORDER BY [TimeStamp] DESC) as tbl USING UNIQUE ID USING SRID=29902

 However this causes slow queries as all data needs to be fetched in order
 before filtering.

 So my question is is there a way to order records using another LAYER
 property (similar to the FILTER property), so ordering is done only on the
 records returned for rendering?

 Thanks for any advice,

 Seth

  --
 web: http://geographika.co.uk
 twitter: @geographika



 ___
 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] tutorial for python mapscript

2014-04-03 Thread Umberto Nicoletti
I'm afraid the mapserver web site is down atm.
The page should still be there when it will come back ;-)

Meanwhile, this is a link to the copy in Google's cache:

http://webcache.googleusercontent.com/search?q=cache:vStf6-OEN3QJ:mapserver.org/mapscript/mapscript.htmlhl=itstrip=1

BR,
Umberto



On Thu, Apr 3, 2014 at 2:44 PM, Luís de Sousa luis.a.de.so...@gmail.comwrote:

 quote author=Umberto Nicoletti
 The API reference is documented here:

 http://www.mapserver.org/mapscript/mapscript.html
 /quote

 This page seems to no longer exist. Is there an alternative? Thanks.

 ___
 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 WMS time support with Oracle

2014-01-20 Thread Umberto Nicoletti
On Mon, Jan 20, 2014 at 2:44 PM, D. Nappo domenico.na...@gmail.com wrote:

 Hi there,

 I couldn't figure out how to solve this. I have a layer so configured:

 LAYER
   NAME layer
   TYPE point
   CONNECTION conn_string
   CONNECTIONTYPE ORACLESPATIAL
   TEMPLATE templates/hotspot_template.html
   DATA SHAPE FROM (SELECT POINT as SHAPE, ACQ_DATE, ACQ_TIME,
 SATELLITE, CONFIDENCE, VERSION, BRIGHT_T31, FRP FROM
 gwsprd.HOT_SPOTS_MODIS) using unique OGR_FID
   METADATA
 wms_title WMS test
 wms_srs   EPSG:4326
 wms_extent-180 -90 180 90
 wms_timeextent 2000-01-01/2020-12-31
 wms_timeitem acq_date
 wms_timedefault 2014-01-01
 wms_timeformat -MM-DD



Try with this:

wms_timeformat DD-MM-YY

it is the default format Oracle expects when converting a string to a date
and no format has been explicitly provided.

Hth,
Umberto



 wms_enable_request *
 END
 CLASS
 SYMBOL 'circle'
 SIZE 2
 COLOR255 0 0
 END
 END



 Now, the date column in the oracle table is the acq_date field.


 The problem is that Mapserver translates that with a wrong oracle query
 (which it works in postgreslq, I guess):

 SELECT OGR_FID,rownum, SHAPE FROM
 (SELECT OGR_FID, POINT as SHAPE,  ACQ_DATE, ACQ_TIME, SATELLITE,
 CONFIDENCE, VERSION, BRIGHT_T31, FRP FROM gwsprd.HOT_SPOTS_MODIS)
 WHERE  acq_date = '2014-01-16'


 The query above uses a wrong filter and it gives the error:

 ORA-01861: literal does not match format string


 How can I tell to Mapserver to use a correct query??? Or do I missing
 anyhting???
 Something like:

 WHERE acq_date = to_date('2014-01-16','-MM-DD')

 ___
 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] custom programming with Mapserver's python or java or C# (OR perl) mapscript

2014-01-06 Thread Umberto Nicoletti
+1 to Andy's reply, I could not have said it better.

All mapscript implementations (java, c#, python, ruby, perl and tcl) share
the same code base, with the language specific glue being automatically
generated by swig.

PHP mapscript is the only exception.

Umberto


On Mon, Jan 6, 2014 at 4:32 PM, Andy Colson a...@squeakycode.net wrote:

 On 1/6/2014 6:34 AM, Sajid Anwar wrote:

 Hello,

 I am wondering how to write a program (function) for Map server, which
 dynamically handle arbitrary shapefile, and will change the style like
 color etc, on the basis of attribute from shapefile. I want to develop
 and rendered choropleth map for arbitrary shapefile.

 I know that we can use MapScript languge like python for custom
 programming, and I already read some tutorial about python mapscript. I
 need help/direction about which scripting language is easy to use and
 more flexible and from where to start ,other link without Map-server
 website and example.


 I already use the Map file in cgi mode, but it is static and here we
 manually change the file(metadata) for each shape file. i am interested
 in a function /program which can handle styling for arbitrary shapefile.


 Thanks in advance


 sajid

 student


 All languages are the same, and can do the same thing.  The question is
 not which language is more flexable, but which language do I know the
 best, or what language would I enjoy learning for this project.

 I choose Perl.  Not because of all the rave reviews it gets, or its
 massive popularity, but because I know perl, I love it, I think in it.

 So pick a language that mapscript supports.  I can offer you the ideas I
 used to write my site, and you can implement them in any language.

 I use mod_perl, FastCGI, and uwsgi... all of which are pretty similar.

 I start out with a url like:
 http://maps.camavision.com/map/iowacityia

 I pull off the last word and stuff that into $xmap.
 Then I check the url for ether WMS or info, and if not found, I return a
 suitable index.html file:

 my $filename = MAPPATH./$xmap.map;
 my $map = new mapscript::mapObj($filename);

 MAPPATH is outside the htdocs folder.

 Then, I've had reports where people have huge monitors so I need to make
 sure the maxsize if at least 4096.  I didnt want to check all my .map
 files, so I just check in mapscript:

 if ($map-{maxsize}  4096)
 {
 $map-{maxsize} = 4096;
 }

 I load various values from the map file, like the bounding box:
 my $bbox = $map-{extent};
 $vars{'minx'} = $bbox-{minx};
 $vars{'miny'} = $bbox-{miny};
 $vars{'maxx'} = $bbox-{maxx};
 $vars{'maxy'} = $bbox-{maxy};

 I generate some javascript for the index.html page:
 $zoom = var bb = new  OpenLayers.Bounds.fromArray([$vars{'minx'},
 $vars{'miny'}, $vars{'maxx'}, $vars{'maxy'}]);\n
 . \t\t\tmap.zoomToExtent(bb, true);\n;

 And then I send it to the browser:
   my $index = $config{$xmap}-{'index'} // 'index.html';
   showTemplate($index, \%vars);

 This page will include the openlayers stuff and setup to render the map.
  openlayers will turn around and request map images using the url param WMS.

 My code, when it sees a WMS requst does this:

 $owreq = new mapscript::OWSRequest();
 my @par = $web-paramNames();
 for my $x (@par)
 {
 my $v = $web-param($x);
 $owreq-setParameter($x, $v);
 }
 my $map = new mapscript::mapObj( MAPPATH./$xmap.map );

 It creates a request object, and copies all the url params into the owreq.

 And here is the part you will like.  If you pass along a parcel number:
 http://maps.camavision.com/map/iowacityia?pin=1004178001

 It dynamically creates a layer called annotate_pin (which is the blue
 highlight):

 if ($layername =~ 'annotate_pin')
 {
 # did we get a click point?
 my $cx = $web-param('LON');
 my $cy = $web-param('LAT');
 if ( defined($cx)  defined($cy))
 {
 $xpin = getPin($cx, $cy);
 }

 $q = $db-prepare(select shapeid from $xmap.getpoint
 where pin = \$1);
 $q-execute($xpin);

 my $layer = $map-getLayerByName('parcels');
 $layer-open();
 my $newlayer = $map-getLayerByName('annotate_pin');
 $newlayer-{status} = $mapscript::MS_ON;

 my $shp;
 ($sid) = $q-fetchrow_array;
 if (defined($sid))
 {
 $shp = $layer-getShape(new
 mapscript::resultObj($sid));

 }
 $q = undef;
 $layer-close();
 my $shape = $shp-clone();
 $newlayer-addFeature($shape);
 }

 In the .map file, the layer annotate_pin exists, but is mostly empty. It
 only contains a STYLE for drawing, but 

Re: [mapserver-users] MapCache 1.2.0 and NGNIX 1.5 problem

2013-10-09 Thread Umberto Nicoletti
Perhaps SELinux is enabled and blocking mapcache fs operatios?
On Oct 9, 2013 12:46 PM, Pascual Ayats, Victor victor.pasc...@icc.cat
wrote:

 OK, I upgrade nginx.conf to

  location @fcgi_mapcache {

fastcgi_param  QUERY_STRING $query_string;
fastcgi_param  REQUEST_METHOD   $request_method;
fastcgi_param  CONTENT_TYPE $content_type;
fastcgi_param  CONTENT_LENGTH   $content_length;
fastcgi_param  PATH_INFO$path_info;
fastcgi_param  SERVER_NAME  $server_name;
fastcgi_param  SERVER_PORT  $server_port;
fastcgi_param  SCRIPT_NAME  /mapcache;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
   }


 I restart nginx, and the error is exactly the same

 
 fstat(1, {st_dev=makedev(0, 8), st_ino=30335, st_mode=S_IFIFO|0600,
 st_nlink=1, st_uid=502, st_gid=502, st_blksize=4096, st_blocks=0,
 st_size=0, st_atime=2013/10/09-11:26:39, st_mtime=2013/10/09-11:26:39,
 st_ctime=2013/10/09-11:26:39}) = 0
 2932  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
 -1, 0) = 0x7fc9c4488000
 2932  write(1, Status: 403 Forbidden\r\nContent-Type:
 text/plain\r\n\r\n403 Forbidden\r\n, 66 unfinished ...
 2930  ... select resumed )= 1 (in [6])
 2930  read(6, Status: 403 Forbidden\r\nContent-Type:
 text/plain\r\n\r\n403 Forbidden\r\n, 4096) = 66
 2930  select(9, [6 8], NULL, NULL, NULL unfinished ...
 2932  ... write resumed ) = 66
 2932  write(2, Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME
 (or SCRIPT_FILENAME) set and is the script executable?, 112 unfinished
 ...
 2930  ... select resumed )= 1 (in [8])
 2930  read(8, Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME
 (or SCRIPT_FILENAME) set and is the script executable?, 4096) = 112
 2930  write(2, Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME
 (or SCRIPT_FILENAME) set and is the script executable?, 112) = 112
 2930  select(9, [6 8], NULL, NULL, NULL unfinished ...

 **

 Continue searching...

 Regards

 Victor
 
 De: thomas bonfort [thomas.bonf...@gmail.com]
 Enviat el: dimecres, 9 / octubre / 2013 10:41
 Per a: Pascual Ayats, Victor
 A/c: mapserver-users@lists.osgeo.org
 Tema: Re: [mapserver-users] MapCache 1.2.0 and NGNIX 1.5 problem

 well, try setting script_name:

 fastcgi_param  SCRIPT_NAME  /mapcache;

 also make sure PATH_INFO is set as it is needed by mapcache. iirc
 fastcgi_params did not include it by default at one point.

 fastcgi_param  PATH_INFO$path_info;

 --
 thomas

 On 9 October 2013 10:31, Pascual Ayats, Victor victor.pasc...@icc.cat
 wrote:
  Thanks for the point,
 
  Indeed, using  strace command, I created a debug LOG to spawn-FGC and
 saw this:
 
  22419 rt_sigaction(SIGPIPE, {SIG_DFL, [PIPE], SA_RESTORER|SA_RESTART,
 0x3259032920}, {0x35d0006290, [], SA_RESTORER, 0x3259032920}, 8) = 0
  22419 fstat(1, {st_dev=makedev(0, 8), st_ino=160933,
 st_mode=S_IFIFO|0600, st_nlink=1, st_uid=502, st_gid=502, st_blksize=4096,
 st_blocks=0, st_size=0, st_atime=2013/10/09-07:51:04,
 st_mtime=2013/10/09-07:51:04, st_ctime=2013/10/09-07:51:04}) = 0
  22419 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
 -1, 0) = 0x7fb6d96f6000
  22419 write(1, Status: 403 Forbidden\r\nContent-Type:
 text/plain\r\n\r\n403 Forbidden\r\n, 66 unfinished ...
  22415 ... select resumed )= 1 (in [6])
  22415 read(6, Status: 403 Forbidden\r\nContent-Type:
 text/plain\r\n\r\n403 Forbidden\r\n, 4096) = 66
  22415 select(9, [6 8], NULL, NULL, NULL unfinished ...
  22419 ... write resumed ) = 66
  22419 write(2, Cannot get script name, are DOCUMENT_ROOT and
 SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?, 112
 unfinished ...
  22415 ... select resumed )= 1 (in [8])
  22415 read(8, Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME
 (or SCRIPT_FILENAME) set and is the script executable?, 4096) = 112
  22415 write(2, Cannot get script name, are DOCUMENT_ROOT and
 SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?, 112) =
 112
  22415 select(9, [6 8], NULL, NULL, NULL unfinished ...
  22419 ... write resumed ) = 112
  22419 write(2, \n, 1 unfinished ...
  22415 ... select resumed )= 1 (in [8])
  22415 read(8, \n, 4096)   = 1
  22415 write(2, \n, 1) = 1
  22415 select(9, [6 8], NULL, NULL, NULL unfinished ...
  22419 ... write resumed ) = 1
  22419 exit_group(99)= ?
  22415 ... select resumed )= 1 (in [6])
  22415 read(6, , 4096) = 0
  22415 close(6)  = 0
  22415 select(9, [8], NULL, NULL, NULL)  = 1 (in [8])
  22415 read(8, , 4096) = 0
  22415 close(8)  = 0
  

Re: [mapserver-users] Adding stackexchange to our support channels

2013-10-04 Thread Umberto Nicoletti
+1

I already have a mapserver filter in place on gis.stackexchange.com

So should it be gis or all stackexchange sites?
I am for gis, as it more relevant to the mapserver community and mapserver
is already listed in the ads:

http://meta.gis.stackexchange.com/ads/display/1968

Umberto


On Fri, Oct 4, 2013 at 12:32 PM, thomas bonfort thomas.bonf...@gmail.comwrote:

 Hi MapServer Users and Power-Users,

 As FrankW pointed out during our FOSS4G presentation, I would like to
 propose that we add stackexchange as an official support channel for
 MapServer. You can check and subscribe to mapserver related questions
 here: http://stackexchange.com/filters/90617/mapserver

 Why?

 - Stackexchange questions and answers are very well referenced through
 search engines, which would avoid recurring questions from being
 brought up on the mailing list
 - The answers get up or down-voted by the community, allowing a user
 to immediately flesh out relevant information for a given question
 - Asking a question on stack-exchange might help new users to seek for
 help, instead of having to subscribe and post to a public mailing list
 (which can be intimidating)

 How?

 - By referencing stackexchange in our getting help documentation section
 - Most importantly, by having MapServer power users subscribe and
 participate to the stackexchange questions, providing answers or
 upvoting correct existing answers.

 Users, is this something that you would find beneficial?
 Power-users, would you be willing to participate to another support
 channel, knowing that in the long run the aim is to reduce your
 workload as the most common questions will answer themselves ?
 PSC, should we have some kind of motion to vote and officialise this?

 best regards,
 Thomas
 ___
 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] New ScribeUI 0.3 Release

2013-09-06 Thread Umberto Nicoletti
Jessica, would you mind sharing some screenshots?
On Sep 6, 2013 10:31 PM, Jessica Lapointe jlapoi...@mapgears.com wrote:

 Hi List,

 ScribeUI is a tool meant to help the editing and management of mapfiles,
 supporting Scribe and Standard mapfile syntax. I am currently developing
 this tool as a Google Summer of Code project.

 The Google Summer of Code ending very soon, the goal of this new release
 is bugfixes, and the beginning of the new plugin system! Please keep in
 mind that a lot of bugs remain, any feedback is welcome, should it be new
 feature ideas, general comments or bug reports.

 *What's new ?*

- Fixed issue #11. This bug caused the client not to keep up with maps
deleted in the backend.
- Added the current zoom level on the map! ( issue #12 ) This makes it
much easier to define your Scribe scale ranges.
- Fixed font size issue #14, the browser tab is now much more
comfortable to use.

 *Work In Progress*

 Still in progress is a simple plugin system. Some functions were added on
 the client side to make it easy to add buttons and tabs to the interface.
 The back-end side of plugins is not supported yet.

 *Download*

 ScribeUI and its installation instructions are available on github:
 https://github.com/mapgears/scribeui

 To get ScribeUI 0.3, you can clone the repo on github and checkout v0.3 or
 you can download an archive:
 https://github.com/mapgears/scribeui/releases/tag/v0.3*
 https://github.com/mapgears/scribeui/releases/tag/v0.3*

 Bug reports can be made on github:
 https://github.com/mapgears/scribeui/issues

 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] Create imageObject failed in python binding.

2013-08-19 Thread Umberto Nicoletti
Shawn,
I have briefly checked the python mapscript sources and I am afraid the you
might have hit a bug.
Python mapscript has a special, more pythonic imageObj constructor which
seems to depend heavily on GD code
and that possibily explains the error you are experiencing.

Would you mind opening an issue at:

https://github.com/mapserver/mapserver/issues/new

Please state the mapserver version and, if built from sources, the options
used.
It would greatly speed up the resolution process if you could build
mapserver/mapscript from the git sources.

BR,
Umberto


On Sun, Aug 18, 2013 at 4:59 AM, Shawn Gao gaoh...@gmail.com wrote:

 Hi, All,

 Official document on mapserver site said use following way to create an
 imageObject instance in python. look at this 
 linkhttp://mapserver.org/mapscript/mapscript.html#imageobj

 new imageObj( int width, int height [, 
 outputFormatObjhttp://mapserver.org/mapscript/mapscript.html#outputformatobj
  format=NULL
 [, string filename=NULL ] ] ) : imageObj

 So I create imageObject in Python by this,

 mapscript.imageObj(100,100,GD/PNG, '
 http://mapserver.org/_static/banner.png')

 But get error, Segmentation fault (core dumped).

 Then I check the test case of python binding. The test case for
 imageObject is in imagetest.py. I try it firstly. Then many cases failed,
 include the case for create imageObject instance. I found the create method
 in test script is in other way.

 def testConstructorUrlStream(self):
 imageObj with a URL stream works
 url = urllib.urlopen('http://mapserver.org/_static/banner.png')
 imgobj = mapscript.imageObj(url, 'GD/JPEG')
 assert imgobj.thisown == 1
 assert imgobj.height == 68
 assert imgobj.width == 439
 imgobj.save('testConstructorUrlStream.jpg')


 What's the correct way to create an imageObject from url or file?

 Thanks,
 Shawn

 ___
 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 performance question - slow on different machine

2013-07-26 Thread Umberto Nicoletti
the only difference seems to be the presence of MapCache on the slower
system. Could you try removing it ?

hth,
Umberto

On Thursday, July 25, 2013, andy wrote:

 On 7/25/2013 1:56 PM, andy wrote:

 On 7/24/2013 10:59 AM, Mark Volz wrote:

 Hello,


 ·The machine is using a 6.8 out of the available 8GB of RAM

 oI think we need more RAM on the system, however I am curious as to why
 the MapServer 5 application ran fast, while MapServer 6 is slow.  Could
 IIS just behave better than Apache under low RAM situations?

 oThat being said both Apache and MapServer take a minimal amount of RAM



 I'm coming from the linux world, but I have to assume windows would do the
 same:  your os should be caching the snot out of your disk. Hopefully that
 6.8 gig of usage is for disk cache.  Any way to tell if that's the case?
  You want all of your ram used as disk cache.

 Is there a way to see how much cpu vs disk is being used?  If your cpu
 usage is high and disk io is low, then you have a huge cache and you don't
 need more ram.

 If your cpu is low and your disk io is high, then you have a tiny cache,
 and you could use more ram.

 -Andy


 __**_
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/**mailman/listinfo/mapserver-**usershttp://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] GSoC Project - ScribeUI: A mapfile editor

2013-07-15 Thread Umberto Nicoletti
Also what did you use to generate those beautiful mock-ups?

Umberto
On Jul 15, 2013 7:34 PM, Jessica Lapointe jlapoi...@mapgears.com wrote:

 Hi,
 It's mostly made of jquery-ui for the GUI, and Flask in the back-end.

 Jessica


 On Mon, Jul 15, 2013 at 11:46 AM, Lime, Steve D (MNIT) 
 steve.l...@state.mn.us wrote:

  Out of curiosity, what GUI/component framework(s) (e.g. Twitter
 Bootstrap, jQuery UI, etc…) are being used or considered?

 ** **

 Steve

 ** **

 *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
 mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Jessica Lapointe
 *Sent:* Monday, July 15, 2013 9:51 AM
 *To:* Rahkonen Jukka
 *Cc:* mapserver-users
 *Subject:* Re: [mapserver-users] GSoC Project - ScribeUI: A mapfile
 editor

 ** **

 Hi,

 ** **

 I am working on making a release later this week, in the meantime you can
 look at the mockups for the application on the project's blog:
 http://mapgears.github.io/scribeui-site/ 

 ** **

 Thanks for your interest !

 Jessica

 ** **

 On Sat, Jul 13, 2013 at 5:24 AM, Rahkonen Jukka 
 jukka.rahko...@mmmtike.fi wrote:

 Hi,

 How is this interesting project going on? I have been awaiting a tool
 like this since the death of MapLab.

 -Jukka Rahkonen-
 
 Julien-Samuel Lacroix wrote


  Hello,

  We are pleased to announce that MapServer got 2 project accepted for the
 Google Summer of Code. This first one is ScribeUI: A GUI and tools for
 MapServer mapfile editing [1]. ScribeUI (name subject to change) is a
 mapfile management GUI that works both locally or remotely. This tool
 aims to make it easier for beginners to start with MapServer and to be a
 productivity tool for power-users. It will of course provide a nice
 mapfile editor with autocompletion, meaningful error messages and color
 swatches. In the future, the tool could be extended to manage MapCache
 tile generation, test SQL queries or even deploy sites.

  You can see the first mockups here:

   http://mapgears.github.io/scribeui-site/

 ScribeUI will support the mapfile syntax as well as the Basemaps [1] and
 Scribe syntax [2]. It will also feature a workspace manager that will
 enable the user to group mapfiles per project and the ability to run on
 a server to make things easier when working remotly.

 About the student:

 Jessica is an entrepreneur. Despite her young age, she already shines at
 the international level (just like Mapgears!) with her font production
 business: CuttyFruty?.com. She developed her interest for font sets when
 she was 13, and today, her fonts are being used by big names such as
 Lise Wathier, Barbie, Microsoft and Rihanna. (Read more here.)

 Even if her first start-up was very artsy, Jessica also has a passion
 for software and web development, and she will actually represent Canada
 at the World Skills competition this July. She is in the process of
 completing a bachelor's degree in computer science, and it is as a
 software developer that she joins the project. We are already looking
 forward to what her exceptional combination of artistic and programming
 skills will bring to the MapServer project.

 [1]
 http://www.google-melange.com/gsoc/project/google/gsoc2013/jlapointe/4001
 [2]  https://github.com/mapserver/basemaps
 [3]  http://www.mapgears.com/en/blog/archive/2013-03-12-scribe
 [4]  http://www.worldskills.org/

 Stay tune for the initial release!

 Julien
 --
 Julien-Samuel Lacroix
 Mapgears
 http://www.mapgears.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

 ** **



 ___
 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] Build Perl-Mapscript om Windows

2013-02-18 Thread Umberto Nicoletti
Helmut,
I would start by downloading a Windows build SDK (scroll midpage, until you
find the header: *GDAL and MapServer build SDK packages (provides to
compile MapServer and GDAL by yourself)*) from:

http://www.gisinternals.com/sdk/

and then extend the build to include Perl mapscript.
It might not be easy but it's probably your best shot.

You could also check if MS4W includes Perl mapscript.

hth,
Umberto



On Mon, Feb 18, 2013 at 4:46 PM, Helmut Seidel M.A. i...@knowhow-la.dewrote:

 Hello everybody,

 my employer wants me to start a mapserver project with perl MapScript in a
 Windows environment, as we do most of our programming in Perl. I've tried
 some html-coding with mapserver and a few very basic perl MapScript
 examples on my Linux machine so far.

 Now comes the task of moving to windows. I have learned that all binary
 distributions do not come with Perl MapScript, so it seems I have to build
 Mapserver from source. (I've only ever built minor projects from source -
 so maybe not everything I say is quite correct). I've browsed the net for
 two day now (not all the time) but I couldn't find instructions how to
 build Mapserver with Perl MapScript support.

 So can anybody please give a few instructions (for built-newbees) howto
 build Perl Mapscript?

 Thanks and regards
 __**_
 mapserver-users mailing list
 mapserver-users@lists.osgeo.**org mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/**mailman/listinfo/mapserver-**usershttp://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] java - mapscript, using hibernate-jpa2

2013-02-15 Thread Umberto Nicoletti
On Fri, Feb 15, 2013 at 8:50 AM, Ahmet Temiz ahmettemi...@gmail.com wrote:

 Hello

  I would like to know your view.

 In java - mapscript, using hibernate-jpa2 is a good choice ?


Depends on what your needs are. In any case I don't see any incompatibility
between the two.
hth,
Umberto


 If you have any experiences in this respect, could you share your
 experiences ?

 regards

 --
 Ahmet Temiz
 Jeoloji Müh.
 Afet ve Acil Durum Yönetimi Başkanlığı
 Planlama ve Zarar Azaltma Dairesi Başkanlığı


 

 Ahmet Temiz
 Geological Eng.
 Information Systems - GIS Group
 Disaster and Emergency Management
 of Presidency
 ___
 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 6.2.0 perl mapscript

2013-02-14 Thread Umberto Nicoletti
make clean

fixed it for me
Umberto


On Thu, Feb 14, 2013 at 3:48 PM, Andy Colson a...@squeakycode.net wrote:

 On 2/14/2013 8:09 AM, Umberto Nicoletti wrote:

 It's in the 6.2 branch, please review it:

 https://github.com/mapserver/**mapserver/commit/**
 a4ac07d8da7d81f42090890a7e359b**dc1f277dbfhttps://github.com/mapserver/mapserver/commit/a4ac07d8da7d81f42090890a7e359bdc1f277dbf

 Umberto



 Mmm.. No, that didnt seem to work.

 andy@mapper:/pub/apps/**mapserver$ git branch
 * branch-6-2
   master



 top level ./configure and make went ok, then:

 andy@mapper:/pub/apps/**mapserver$ cd mapscript/perl

 andy@mapper:/pub/apps/**mapserver/mapscript/perl$ perl Makefile.PL
 -I/pub/apps/mapserver -I/usr/local/include -I/usr/include
 -L/usr/lib -L/pub/apps/mapserver/.libs -lmapserver
 -rpath /usr/lib -lmapserver -lfreetype -lz -lbz2 -L/usr/lib64 -lgd -lproj
 -ljpeg -lpng -lgif -L/usr/local/lib -lgdal -L/usr/local/pg92/lib -lpq
 -L/usr/lib64 -lgeos_c -lc -lm -ldl -lstdc++
 6.2.0
 Writing Makefile for mapscript
 Writing MYMETA.yml and MYMETA.json

 andy@mapper:/pub/apps/**mapserver/mapscript/perl$ make
 cp mapscript.pm blib/lib/mapscript.pm
 cc -c  -I/pub/apps/mapserver -I/usr/local/include -I/usr/include
 -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector
 -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -fPIC
 -DVERSION=\6.2.0\ -DXS_VERSION=\6.2.0\ -fPIC -I/usr/lib64/perl5/CORE
  -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR
 -DUSE_WMS_SVR -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL
 -DUSE_OGR -DUSE_GEOS -DHAVE_SYNC_FETCH_AND_ADD -DUSE_PROJ -DUSE_GD
 -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_GIF -DUSE_ICONV -DUSE_JPEG -DUSE_GIF
 -DUSE_PNG -DUSE_FREETYPE -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT
 -DNEED_STRRSTR -DDISABLE_CVSID mapscript_wrap.c
 mapscript_wrap.c: In function '_wrap_scaleTokenEntryObj_**minscale_set':
 mapscript_wrap.c:21664:5: error: unknown type name 'scaleTokenEntryObj'
 mapscript_wrap.c:21664:33: error: 'scaleTokenEntryObj' undeclared (first
 use in this function)
 mapscript_wrap.c:21664:33: note: each undeclared identifier is reported
 only once for each function it appears in
 mapscript_wrap.c:21664:53: error: expected expression before ')' token
 mapscript_wrap.c:21680:33: error: expected expression before ')' token
 ...Lots more...



 __**_
 mapserver-users mailing list
 mapserver-users@lists.osgeo.**org mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/**mailman/listinfo/mapserver-**usershttp://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 6.2.0 perl mapscript

2013-02-13 Thread Umberto Nicoletti
Perhaps then you've hit this issue:

https://github.com/mapserver/mapserver/issues/4528

Let me know and I'll make sure to push it forward asap.

br,
Umberto


On Wed, Feb 13, 2013 at 9:03 PM, Andy Colson a...@squeakycode.net wrote:

 I was not doing a toplevel make install, so it didnt copy
 libmapserver-6.2.0.so.

 But, even after fixing my script, and installing:

 usr/local/lib64/perl5/auto/**mapscript/mapscript.so
 usr/lib/libmapserver.la
 usr/lib/libmapserver-6.2.0.so

 I get the same error.  Also:

 ldd /usr/local/lib64/perl5/auto/**mapscript/mapscript.so

 doesn't show it using libmapserver.

 -Andy


 On 2/13/2013 1:30 PM, Umberto Nicoletti wrote:

 As of 6.2 mapscript is built as a shared lib and depends on mapserver
 which therefore must have been installed before.

 Umberto

 On Feb 13, 2013 8:27 PM, Andy Colson a...@squeakycode.net
 mailto:a...@squeakycode.net wrote:

 On 2/13/2013 1:19 PM, Umberto Nicoletti wrote:

 Did you run make install in the MapServer top level directory?

 Umberto

 On Feb 13, 2013 7:52 PM, Andy Colson a...@squeakycode.net
 mailto:a...@squeakycode.net
 mailto:a...@squeakycode.net mailto:a...@squeakycode.net**
 wrote:

  Hi all,

  I'm having problems updating to 6.2.0.  I can get perl
 mapscript to
  compile and install ok, but when I try to run anything:

  # perl dump.pl http://dump.pl http://dump.pl
  perl: symbol lookup error:
  /usr/local/lib64/perl5/auto/__**__mapscript/mapscript.so:

 undefined
  symbol: msSetup

  Any hints what might be wrong?

  Thanks for your time,

  -Andy


 I believe so.  I'm actually making a slackware package (which I've
 done for 6.0.3 as well), and then I install the package.

 ls -l /usr/local/lib64/perl5/auto/__**mapscript/mapscript.so

 does show it as todays date, so I'm pretty sure its new.

 I will go try to build it by hand and verify its not the packaging
 script that's a problem.

 -Andy





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


Re: [mapserver-users] Installing MapServer 6.2 on IIS7.5

2013-02-12 Thread Umberto Nicoletti
Saved you both some time and copied your notes in the wiki:

https://github.com/mapserver/mapserver/wiki/Installing-mapserver-under-IIS

Cheers,
Umberto


On Tue, Feb 12, 2013 at 9:20 AM, Donald Kerr donald.k...@dkerr.co.ukwrote:

 Neil,

 ** **

 I have some rough notes for my set up (Classic ASP website wit Openlayers
 – Mapserver WMS/WFS) as follows:

 ** **

 **1.  **IIS

 **a.  **Click Start, Control Panel, Programs, Turn Windows features
 on or off.

 **b.  **Select Internet Information Services.

 **c.   **Select Web Management Tools then select IIS Management
 Consule.

 **d.  **Select World Wide Web Services

 **e.  **In Application development Features, select ASP, CGI, ISAPI
 Extensions, ISAPI Filters and Server-Side Includes.

 **f.**In Common HTTP Features, select Default Document, HTTP
 Errors, HTTP Redirection and Static Content.

 **g.  **In Health and Diagnostics, select HTTP Logging and Request
 Monitor.

 **h.  **In Performance Features, select Static Content Compression.***
 *

 **i.**In Security, select Request Filtering.

 **j.**Navigate to http://localhost – An IIS welcome page should
 be shown.

 **k.   **Run inetmgr.

 **l.**Highlight Default Web Site under Sites the right-click,
 Manage Web Site then click Advanced Settings. Change the physical path to
 d:\vmds\web\.

 **m.**Double-click ASP in the centre panel of IIS Manager and ensure
 the following are set:

 **  i.  **Enable
 Parent Paths

 **n.  **Click on Application Pools in the left hand panel of IIS
 Manager, click DefaultAppPool in the centre panel then click advanced
 settings in the right hand panel. Ensure that Enable 32-Bit Applications is
 set to True.

 **o.  **Create the following virtual directories in IIS:

 **  i.  **cgi-bin
d:\mapserver\cgi-bin (Neil, will probably be MS4W
 cgi-bin?)

 ** ii.**mapserver
 d:\mapserver\wwwroot (Neil, you will probably not require this)

 **p.**Mapserver via FastCGI

 **  i.**Click on Default Web Site
 then double-click Handler Mappings in the centre panel.

 ** ii.**In the Actions Pane, click
 Add Module Mapping then set the following:

 **1. **Request path: *.exe

 **2. **Module:  FastCgiModule

 **3. **Executable: d:\mapserver\cgi-bin\mapserv.exe

 **4. **Name: Mapserver via FastCGI

 **5. **Click on Request Restrictions and set the following:

 **a. **Mapping Tab: Check “Invoke hander … “, then set for “File”.

 **b.**Verbs Tab: “One of the following …”, enter “GET,HEAD,POST”.

 **c. **Access Tab: Check “Execute”.

 **iii.**Whilst the “Mapserver via
 FastCGI” handler mapping is highlighted, click on Edit feature permissions
 in the right hand panel then ensure that read, script and execute are
 checked.

 ** **

 For 64 bit Mapserver:

 ** **

 **2.  **Mapserver x64

 **a.  **Download x64 version of Mapserver from
 http://www.gisinternals.com/sdk/ 

 **b.  **Delete all existing files in d:\mapserver\cgi-bin\. These are
 the 32 bit Mapserver files from MS4W.

 **c.   **From the above download, copy all dlls from /bin/ to
 d:\mapserver\cgi-bin\.

 **d.  **Copy Mapserv.exe from /bin/ms/apps/ to d:\mapserver\cgi-bin***
 *

 ** **

 I hope this helps. If you write it up properly (something I should have
 done) then please send me a copy.

 ** **

 Regards,

 ** **

 Donald

 ** **

 ** **

 ** **

 *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
 mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Neil Crisp
 *Sent:* 12 February 2013 04:39
 *To:* mapserver-users@lists.osgeo.org
 *Subject:* [mapserver-users] Installing MapServer 6.2 on IIS7.5

 ** **

 I have successfully installed the latest release of MapServer (6.2beta4)
 on Windows via MS4W using Apache, but I need to get it running under
 IIS7.5.  I haven't been having a good time.

 ** **

 The latest documentation (Release 6.3-dev) still has the old IIS 5
 documentation written by Debbie Paqurek back in 2005 and the latest other
 documentation I can find is for IIS 6 and is rather complex.

 ** **

 Has anyone successfully installed it on IIS7.5 and if so do you have a
 nice straightforward procedure for it?  Something similar to Debbie's
 instructions, but up to date, would be great.

 ** **

 Thanks 

 Neil Crisp.

 ** **

 ** **

 *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
 mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Neil Crisp
 *Sent:* 12 February 

Re: [mapserver-users] tutorial for python mapscript

2013-02-08 Thread Umberto Nicoletti
Andrea,
are you looking for something specific? ie: cgi wrapper, WxS wrapper,
querying, mapfile modification...

The python mapscript folder contains a test directory with plenty of
examples in the form of unit tests.

The API reference is documented here:

http://www.mapserver.org/mapscript/mapscript.html

hth,
Umberto



On Fri, Feb 8, 2013 at 8:13 PM, Andrea Peri aperi2...@gmail.com wrote:

 Hi,

 There is a tutorial to learn how start to do a python mapscript for a
 runtime mapfile ?

 Thx,

 --
 -
 Andrea Peri
 . . . . . . . . .
 qwerty àèìòù
 -
 ___
 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] tutorial for python mapscript

2013-02-08 Thread Umberto Nicoletti
On Feb 8, 2013 9:23 PM, Andrea Peri aperi2...@gmail.com wrote:

 Hi,
 thx for hints.

 I need to understand how and how much is possible to change the
 mapfile using python mapscripts.

 More specific I need to understand if with mapscript is allowed to set
 the visibility of specific layers to specific IP addresses.

Certainly, I have used it myself in java for a long time


 2013/2/8 Umberto Nicoletti umberto.nicole...@gmail.com:
  Andrea,
  are you looking for something specific? ie: cgi wrapper, WxS wrapper,
  querying, mapfile modification...
 
  The python mapscript folder contains a test directory with plenty of
  examples in the form of unit tests.
 
  The API reference is documented here:
 
  http://www.mapserver.org/mapscript/mapscript.html
 
  hth,
  Umberto
 
 
 
  On Fri, Feb 8, 2013 at 8:13 PM, Andrea Peri aperi2...@gmail.com wrote:
 
  Hi,
 
  There is a tutorial to learn how start to do a python mapscript for a
  runtime mapfile ?
 
  Thx,
 
  --
  -
  Andrea Peri
  . . . . . . . . .
  qwerty àèìòù
  -
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 



 --
 -
 Andrea Peri
 . . . . . . . . .
 qwerty àèìòù
 -
 ___
 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] MapFile viewer

2012-12-14 Thread Umberto Nicoletti
I for one starred the project. It could be useful for integration testing,
i.e. for use with our CI.
Ivan, thanks for the viewer.

Umberto



On Fri, Dec 14, 2012 at 12:14 PM, Ivan Mincik ivan.min...@gmail.com wrote:

 On 12/14/2012 10:20 AM, Thomas Gratier wrote:
  Hello,
 
  What is the advantage compare to OpenLayers built-in viewer (since 6.x
  version) e.g http://mapserver.org/trunk/fr/openlayers.html ?


 I do not use that viewer, but it could be one of these:

 1. Works for MapServer  6.0

 2. Doesn't require web server running on Your machine. It creates its
 own WSGI server which is more like development environments should look
 like (Django dev server).

 3. I am not sure how viewer in MapServer deals with errors in mapfile.
 In my case it prints usable error message to console which is key
 feature for debugging.

 4. Possibilities to override CONNECTION setting - in production we use
 variables substitution ('user=%MYUSER% password=%MYPASSWORD%
 dbname=%MYDBNAME% host=%MYHOST%'). In development I can send there my
 user credentials.

 5. Possibility to override some other parameters line EXTENT. It creates
 possibility to work with many projects with the same base mapfile. I
 will add other overriding options.


 6. Or maybe No advantage at all


 --
 Ivan Mincik
 ___
 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] System.AccessViolationException on mapscriptPINVOKE.delete_symbolObj

2012-12-06 Thread Umberto Nicoletti
John,
please open an issue on https://github.com/mapserver/mapserver/issues
It will help greatly if you could attach a small test case so that we can
reproduce the issue and track the cause.

Thanks,
Umberto



On Wed, Dec 5, 2012 at 12:34 AM, Huotari, John B (RCIS) 
john.huot...@rcis.com wrote:

  I’m using C Sharp MapScript to access MapServer (MS4W 3.0.6).  I’m
 creating a new mapObj from an almost empty MAPFILE and then dynamically add
 layers to the map and then calling draw to generate an image.  I’m also
 dynamically adding symbolObjs to the map’s symbolset for the layers to
 reference.  This all works great the vast majority of the time, but on rare
 occasions, sometime after the map has been generated, I receive the
 following AccessViolationException when garbage collection is attempting to
 clean up the MapServer objects.

 ** **

 System.AccessViolationException was unhandled

   Message=Attempted to read or write protected memory. This is often an
 indication that other memory is corrupt.

   Source=mapscript_csharp

   StackTrace:

at OSGeo.MapServer.mapscriptPINVOKE.delete_symbolObj(HandleRef
 jarg1)

at OSGeo.MapServer.symbolObj.Dispose()

at OSGeo.MapServer.symbolObj.Finalize()

   InnerException:

 ** **

 ** **

 I’ve tried disposing of the map itself, its symbolset, as well as each
 symbolObj item in that symbolset by calling Dispose on each, but doing so
 neither causes the error to happen immediately upon calling Dispose
 (instead it still only happens when garbage collection runs) nor does it do
 anything to resolve the issue.  I don’t see any reference to symbolObj in
 the map layers (looks like it just holds a symbol name and/or index) nor
 anywhere else that stands out as a logical place to look, so I don’t see
 anything else to dispose.  Does anyone have any idea of where I could look
 for any symbolObjs which have been allocated so I can dispose of them so
 that garbage collection does not choke when attempting to dispose of them
 for me?  Am I barking up the wrong tree and should be looking somewhere
 else entirely rather than focusing on symbolObj?

 ** **

 Thanks for any guidance that can be provided,

 John

 ___
 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 6.2.0 undefined reference to `__sync_sub_and_fetch_4'

2012-11-28 Thread Umberto Nicoletti
Stephen,
my bad. I though I had it backported, but not.

It's in the 6.2 branch now:
https://github.com/mapserver/mapserver/commit/6d2fe7de10b0c17204df1785737b3dcbf475d972

Umberto


On Mon, Nov 26, 2012 at 11:49 PM, Stephen Davies sdav...@sdc.com.au wrote:

 I've been in hospital for a week or so getting a new knee so have not been
 able to follow up on this issue.

 I have managed to get a working 6.2.0 executable by manually editing the
 outputs from configure before making but would still like to find a proper
 fix.

 What happened to Umberto's patch? How come it is not inthe current sources?

 Cheers and thanks,
 Stephen

 On Saturday, November 17, 2012 03:25:35 PM Stephen Davies wrote:
  I have found the discussion of this issue from mid-October but the source
  code that I downloaded from mapserver.org yesterday still gives the
 error.
 
  Where can I get a version that does not give this error?
 
  I am trying to build on Linux with GCC 4.4.3.
 
  Cheers and thanks,
  Stephen

 --

 =
 Stephen Davies Consulting P/L   Phone: 08-8177 1595
 Adelaide, South Australia.Mobile:040 304
 0583
 Records  Collections Management.
 ___
 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] Mapscript java 6.2

2012-11-21 Thread Umberto Nicoletti
So what was different between the two?

(adding mapserver-users back that got lost in the prev reply)

On Wed, Nov 21, 2012 at 3:06 PM, Gaston Lucero gaston.luce...@gmail.comwrote:

 Umberto it's work.

 Thanks you very much!!



 2012/11/21 Umberto Nicoletti umberto.nicole...@gmail.com

 Gaston,
 could you please try and follow these steps to build it:

 cd mapserver-6.2.0
 ./configure [add your options here]
 make
 sudo make install
 cd mapscript/java
 make
 make test

 Umberto


 On Fri, Nov 16, 2012 at 4:12 PM, Gaston Lucero 
 gaston.luce...@gmail.comwrote:

 Hi thanks for the answer, yes i run it, after make mapserver on the top
 level directory

 This is  the mapserv file
 MapServer version 6.2.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ
 SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV
 SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=THREADS SUPPORTS=GEOS
 INPUT=JPEG INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE

 Inside mapscript/java

 I run make, make test and  make threadtests , without errors


 My java  version  is 1.7.0_09, under Ubuntu 12.10 64-bit





 2012/11/16 Umberto Nicoletti umberto.nicole...@gmail.com

 Did you run make install after make in the mapserver top-level
 directory?


 On Fri, Nov 16, 2012 at 3:56 PM, Gaston Lucero 
 gaston.luce...@gmail.com wrote:

 I get this error

 root@Gaston:/home/gaston/mapserver-6.2.0/mapscript/java# make install
 /bin/bash ../../libtool --mode=install /usr/bin/install -c
 libjavamapscript.la /usr/local/lib
 libtool: install: warning: relinking `libjavamapscript.la'
 libtool: install: (cd /home/gaston/mapserver-6.2.0/mapscript/java;
 /bin/bash /home/gaston/mapserver-6.2.0/libtool  --tag CXX --mode=relink 
 g++
 -rpath /usr/local/lib -module -release 6.2.0 -o 
 libjavamapscript.lajavamapscript_wrap.lo ../../
 libmapserver.la )
 libtool: relink: g++  -fPIC -DPIC -shared -nostdlib
 /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o
 /usr/lib/gcc/x86_64-linux-gnu/4.7/crtbeginS.o  .libs/javamapscript_wrap.o
 -L/usr/local/lib -lmapserver -L/usr/lib -lproj -ljpeg -lpng
 -L/usr/lib/x86_64-linux-gnu -lgif -lgdal -lpq -lcurl -lgeos_c -lpthread
 -lxml2 -ldl -lfreetype -lz -lcairo -lpng12
 -L/usr/lib/gcc/x86_64-linux-gnu/4.7
 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu
 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib 
 -L/lib/x86_64-linux-gnu
 -L/lib/../lib -L/usr/lib/../lib
 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../.. -lstdc++ -lm -lc -lgcc_s
 /usr/lib/gcc/x86_64-linux-gnu/4.7/crtendS.o
 /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o
  -Wl,-soname -Wl,libjavamapscript-6.2.0.so -o .libs/
 libjavamapscript-6.2.0.so
 /usr/bin/ld: cannot find -lmapserver
 collect2: error: ld returned 1 exit status
 libtool: install: error: relink `libjavamapscript.la' with the above
 command before installing it
 make: *** [install] Error 1


 Any idea?

 ___
 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] Mapscript java 6.2

2012-11-16 Thread Umberto Nicoletti
Did you run make install after make in the mapserver top-level directory?


On Fri, Nov 16, 2012 at 3:56 PM, Gaston Lucero gaston.luce...@gmail.comwrote:

 I get this error

 root@Gaston:/home/gaston/mapserver-6.2.0/mapscript/java# make install
 /bin/bash ../../libtool --mode=install /usr/bin/install -c
 libjavamapscript.la /usr/local/lib
 libtool: install: warning: relinking `libjavamapscript.la'
 libtool: install: (cd /home/gaston/mapserver-6.2.0/mapscript/java;
 /bin/bash /home/gaston/mapserver-6.2.0/libtool  --tag CXX --mode=relink g++
 -rpath /usr/local/lib -module -release 6.2.0 -o 
 libjavamapscript.lajavamapscript_wrap.lo ../../
 libmapserver.la )
 libtool: relink: g++  -fPIC -DPIC -shared -nostdlib
 /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o
 /usr/lib/gcc/x86_64-linux-gnu/4.7/crtbeginS.o  .libs/javamapscript_wrap.o
 -L/usr/local/lib -lmapserver -L/usr/lib -lproj -ljpeg -lpng
 -L/usr/lib/x86_64-linux-gnu -lgif -lgdal -lpq -lcurl -lgeos_c -lpthread
 -lxml2 -ldl -lfreetype -lz -lcairo -lpng12
 -L/usr/lib/gcc/x86_64-linux-gnu/4.7
 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu
 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib -L/lib/x86_64-linux-gnu
 -L/lib/../lib -L/usr/lib/../lib
 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../.. -lstdc++ -lm -lc -lgcc_s
 /usr/lib/gcc/x86_64-linux-gnu/4.7/crtendS.o
 /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o
  -Wl,-soname -Wl,libjavamapscript-6.2.0.so -o .libs/
 libjavamapscript-6.2.0.so
 /usr/bin/ld: cannot find -lmapserver
 collect2: error: ld returned 1 exit status
 libtool: install: error: relink `libjavamapscript.la' with the above
 command before installing it
 make: *** [install] Error 1


 Any idea?

 ___
 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] Mapfile VS MapScript performance

2012-11-07 Thread Umberto Nicoletti
I have tested cgi against python mapscript (with mod_python) and the
performance improvement, as expected, is massive.


On Wed, Nov 7, 2012 at 8:53 AM, Spirifer ready...@gmail.com wrote:

 Hi,

 I would to use MapServer to create WMS/WFS services.

 I think to compare 2 systems to produce services:
 1) Apache + MapServer CGI + static mapfile (.map)
 2) Apache + MapScript PHP + map configuration in cache

 Somebody has tested the performance between the mapfile and MapScript ?

 Thanks.



 --
 View this message in context:
 http://osgeo-org.1560.n6.nabble.com/Mapfile-VS-MapScript-performance-tp5014463.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] Mapfile VS MapScript performance

2012-11-07 Thread Umberto Nicoletti
The python wrapper is actually ~ 6 lines ;-)



On Wed, Nov 7, 2012 at 9:47 AM, Mike Saunt mikesa...@gmail.com wrote:

 As the cgi is robust and heavily tested I would think you would save
 massive amounts of developer time in not writing python wrapper code too!
 On Nov 7, 2012 8:42 AM, Umberto Nicoletti umberto.nicole...@gmail.com
 wrote:

 I have tested cgi against python mapscript (with mod_python) and the
 performance improvement, as expected, is massive.


 On Wed, Nov 7, 2012 at 8:53 AM, Spirifer ready...@gmail.com wrote:

 Hi,

 I would to use MapServer to create WMS/WFS services.

 I think to compare 2 systems to produce services:
 1) Apache + MapServer CGI + static mapfile (.map)
 2) Apache + MapScript PHP + map configuration in cache

 Somebody has tested the performance between the mapfile and MapScript ?

 Thanks.



 --
 View this message in context:
 http://osgeo-org.1560.n6.nabble.com/Mapfile-VS-MapScript-performance-tp5014463.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


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


Re: [mapserver-users] Mapfile VS MapScript performance

2012-11-07 Thread Umberto Nicoletti
The performance point being made clear by Thomas I think I should mention a
couple of (mostly in functionality) advantages that the WxS wrappers might
have against cgi/fastcgi:

1. it is easy to extend the wrapper to add accounting, logging, caching.
True, accounting and logging can also be accomplished simply by processing
the web server log files but that requires  extra software and might not be
easy to impement in complex situations (think a cached request costs x and
a non-cached y)

2. request preprocessing: filtering layers, redirecting

3. image/response prostprocessing: caching, assembling, watermarking,...

Umberto




On Wed, Nov 7, 2012 at 10:15 AM, thomas bonfort thomas.bonf...@gmail.comwrote:

 - testing against cgi isn't really an objective test, but even so the
 differences will iron out as soon as the actual workloads are not trivial
 (i.e. if you're just benchmarking getcapabilities then sure, mapscript
 keeping in memory your mapfile will be orders of magnitude faster than cgi.
 switching to complex map draws will show very similar performance between
 both options)
 - using fastcgi will somewhat iron out the differences on trivial workloads
 - certain mapscript scripts will leak non trivial amounts of memory,
 forcing server restarts periodically if you don't have an infinite amount
 of memory available.

 with all that said, my recommendation is to stick with cgi/fastcgi unless
 you have very specific needs that force you to use mapscript.

 --
 thomas


 On Wed, Nov 7, 2012 at 9:42 AM, Umberto Nicoletti 
 umberto.nicole...@gmail.com wrote:

 I have tested cgi against python mapscript (with mod_python) and the
 performance improvement, as expected, is massive.


 On Wed, Nov 7, 2012 at 8:53 AM, Spirifer ready...@gmail.com wrote:

 Hi,

 I would to use MapServer to create WMS/WFS services.

 I think to compare 2 systems to produce services:
 1) Apache + MapServer CGI + static mapfile (.map)
 2) Apache + MapScript PHP + map configuration in cache

 Somebody has tested the performance between the mapfile and MapScript ?

 Thanks.



 --
 View this message in context:
 http://osgeo-org.1560.n6.nabble.com/Mapfile-VS-MapScript-performance-tp5014463.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



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


Re: [mapserver-users] undefined reference to `__sync_sub_and_fetch_4'

2012-10-18 Thread Umberto Nicoletti
Could you try to compile the following code:

/* begin */
int
main ()
{
int x;__sync_fetch_and_add(x,1);
  ;
  return 0;
}
/* end */

How to compile: save to test.c and then run:

gcc test.c

Best regards,
Umberto

On Thu, Oct 18, 2012 at 1:01 PM, Thiago Tiedtke dos Reis
tied...@gmail.comwrote:

 Hi,

 I having the same problem when trying to compile the mapserver with
 msys/mingw under Ms windows 7 32bit.

 Regards,

 Thiago Tiedtke dos Reis
 Em 17/10/2012 14:32, Umberto Nicoletti umberto.nicole...@gmail.com
 escreveu:

 David,
 what is your os/platform?

 On Oct 17, 2012 6:30 PM, David Quinn daithiqu...@gmail.com wrote:
 
  Hello List,
 
  I'm getting the following error when I try to compile
 mapserver-6.2.0-rc1
 
  $make
  /bin/sh ./libtool --mode=link --tag=CXX g++ -rpath /home/david/lib
  shp2img.lo libmapserver.la -o shp2img
  libtool: link: g++ .libs/shp2img.o -o .libs/shp2img
  ./.libs/libmapserver.so -L/home/david/lib /home/david/lib/libgd.so
  -L/usr/lib /home/david/lib/libproj.so /home/david/lib/libgdal.so
  -L/home/david -L/usr/kerberos/lib /usr/lib/libexpat.so
  /home/david/lib/libgif.so /home/david/lib/libcurl.so
  /home/david/lib/libgeos_c.so /home/david/lib/libgeos.so
  /home/david/lib/libxml2.so /home/david/lib/libfreetype.so
  -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcairo -lXpm -lfontconfig
  -lpng12 -lsqlite3 -lodbc -lodbcinst -ljpeg -lpng -lpq -lpthread -lSM
  -lICE -lX11 -lidn -lldap -lrt -lssl -lcrypto -ldl -lz -lbz2 -Wl,-rpath
  -Wl,/home/david/lib
  ./.libs/libmapserver.so: undefined reference to `__sync_sub_and_fetch_4'
  collect2: ld returned 1 exit status
  make: *** [shp2img] Error 1
 
  I originally got this error message: /usr/bin/ld: warning:
  libcurl.so.3, needed by /home/david/lib/libgdal.so, may conflict with
  libcurl.so.4 so I installed gdal from trunk, and reinstalled freetype,
  giflib and libcurl
 
  I've also attached the output from my ./configure command:
 
 
  -- Compiler Info -
C compiler:gcc -g-Wall
 -Wdeclaration-after-statement
C++ compiler:  g++ -g-Wall
Debug: -g
Generic NINT:
 
   -- Renderer Settings -
OpenGL support:
zlib support:
png support:   -DUSE_PNG
gif support:   -DUSE_GIF
jpeg support:  -DUSE_JPEG
freetype support:  -DUSE_FREETYPE
iconv support: -DUSE_ICONV
AGG support:   internal
GD support:-DUSE_GD  -DUSE_GD_PNG -DUSE_GD_JPEG
 -DUSE_GD_GIF
Cairo (SVG,PDF) support:   -DUSE_CAIRO
Cairo SVG symbol support:
KML support:   -DUSE_KML
 
   -- Support Libraries -
Proj.4 support:-DUSE_PROJ
Proj Fastpaths:
Libxml2 support:   -DUSE_LIBXML2
FriBidi support:
Curl support:  -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH
FastCGI support:
Exempi support:
Threading support:
GEOS support:  -DUSE_GEOS
XML Mapfile support:
XSLT support:
EXSLT support:
 
   -- Data Format Drivers ---
PostGIS support:   -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION
ArcSDE support:
OGR support:   -DUSE_OGR
GDAL support:  -DUSE_GDAL
Oracle Spatial support:
 
   -- OGC Services --
WMS Server:-DUSE_WMS_SVR
WMS Client:-DUSE_WMS_LYR
WFS Server:-DUSE_WFS_SVR
WFS Client:-DUSE_WFS_LYR
WCS Server:-DUSE_WCS_SVR
SOS Server:
 
   -- MapScript -
PHP MapScript: yes
Python MapScript:  no
 
  -David
  ___
  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] undefined reference to `__sync_sub_and_fetch_4'

2012-10-18 Thread Umberto Nicoletti
could you share the configure.log file? I'll try to work on this later
today.

Thanks,
Umberto

On Thursday, October 18, 2012, Thiago Tiedtke dos Reis wrote:

 Hi,

 In my case (Msys/Mingw under Windows 7 32bit), no error was presented, and
 the object a.exe was generated.

 My env:

 Tiedtke@Tiedtke-Note ~
 $ gcc -v
 Using built-in specs.
 COLLECT_GCC=C:\MinGW\bin\gcc.exe

 COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.7.0/lto-wrapper.exe
 Target: mingw32
 Configured with: ../gcc-4.7.0/configure
 --enable-languages=c,c++,ada,fortran,obj
 c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared
 --enable-libgo
 mp --disable-win32-registry --enable-libstdcxx-debug
 --disable-build-poststage1-
 with-cxx --enable-version-specific-runtime-libs --build=mingw32
 --prefix=/mingw
 Thread model: win32
 gcc version 4.7.0 (GCC)

 Regards,

 Tiedtke


 2012/10/18 Umberto Nicoletti umberto.nicole...@gmail.com

 Could you try to compile the following code:

 /* begin */
 int
 main ()
 {
 int x;__sync_fetch_and_add(x,1);
   ;
   return 0;
 }
 /* end */

 How to compile: save to test.c and then run:

 gcc test.c

 Best regards,
 Umberto

 On Thu, Oct 18, 2012 at 1:01 PM, Thiago Tiedtke dos Reis 
 tied...@gmail.com wrote:

 Hi,

 I having the same problem when trying to compile the mapserver with
 msys/mingw under Ms windows 7 32bit.

 Regards,

 Thiago Tiedtke dos Reis
 Em 17/10/2012 14:32, Umberto Nicoletti umberto.nicole...@gmail.com
 escreveu:

  David,
 what is your os/platform?

 On Oct 17, 2012 6:30 PM, David Quinn daithiqu...@gmail.com wrote:
 
  Hello List,
 
  I'm getting the following error when I try to compile mapserver-6.2.0-rc1
 
  $make
  /bin/sh ./libtool --mode=link --tag=CXX g++ -rpath /home/david/lib
  shp2img.lo libmapserver.la -o shp2img
  libtool: link: g++ .libs/shp2img.o -o .libs/shp2img
  ./.libs/libmapserver.so -L/home/david/lib /home/david/lib/libgd.so
  -L/usr/lib /home/david/lib/libproj.so /home/david/lib/libgdal.so
  -L/home/david -L/usr/kerberos/lib /usr/lib/libexpat.so
  /home/david/lib/libgif.so /home/david/lib/libcurl.so
  /home/david/lib/libgeos_c.so /home/david/lib/libgeos.so
  /home/david/lib/libxml2.so /home/david/lib/libfreetype.so
  -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcairo -lXpm -lfontconfig
  -lpng12 -lsqlite3 -lodbc -lodbcinst -ljpeg -lpng -lpq -lpthread -lSM
  -lICE -lX11 -lidn -lldap -lrt -lssl -lcrypto -ldl -lz -lbz2 -Wl,-rpath
  -Wl,/home/david/lib
  ./.libs/libmapserver.so: undefined reference to `__sync_sub_and_fetch_4'
  collect2: ld returned 1 exit status
  make: *** [shp2img] Error 1
 
  I originally got this error message: /usr/bin/ld: warning:
  libcurl.so.3, needed by /home/david/lib/libgdal.so, may conflict with
  libcurl.so.4 so I installed gdal from trunk, and reinstalled freetype,
  giflib and libcurl
 
  I've also attached the output from my ./configure command:
 
 
  -- Compiler Info -
C compiler:gcc -g-Wall
 -Wdeclaration-after-statement
C++ compiler:  g++ -g-Wall
Debug: -g
Generic NINT:
 
   -- Renderer Settings -
OpenGL support:
zlib support:
png support:   -DUSE_PNG
gif support:   -DUSE_GIF
jpeg support:  -DUSE_JPEG
freetype support:  -DUSE_FREETYPE
iconv support: -DUSE_ICONV
AGG support:   internal
GD support:-DUSE_GD  -DUSE_GD_PNG -DUSE_GD_JPEG
 -DUSE_GD_GIF
Cairo (SVG,PDF) support:   -DUSE_CAIRO
Cairo SVG symbol support:
KML support:   -DUSE_KML
 
   -- Support Libraries -
Proj.4 support:-DUSE_PROJ
Proj Fastpaths:
Libxml2 support:   -DUSE_LIBXML2
FriBidi support:
Curl support:  -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH
FastCGI support:
Exempi support:
Threading support:
GEO


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


Re: [mapserver-users] undefined reference to `__sync_sub_and_fetch_4'

2012-10-18 Thread Umberto Nicoletti
I have opened a pull request that should fix the error you're seeing:

https://github.com/mapserver/mapserver/pull/4502

let me know if it works so that I can merge it.
Btw, for those interested, the code snippet I asked you to compile earlier
did not check correctly for the presence of __sync_fetch_and_add, this one
does (it should not compile for the both of you):

int main () {
long x;long y=__sync_fetch_and_add(x,1);
return 0;
}


Thanks,
Umberto


On Thu, Oct 18, 2012 at 8:11 PM, Thiago Tiedtke dos Reis
tied...@gmail.comwrote:

 Hi Umberto,

 My config.log is attached.

 Thanks!

 Best regards,


 Tiedtke

 2012/10/18 Umberto Nicoletti umberto.nicole...@gmail.com

 could you share the configure.log file? I'll try to work on this later
 today.

 Thanks,
 Umberto


 On Thursday, October 18, 2012, Thiago Tiedtke dos Reis wrote:

 Hi,

 In my case (Msys/Mingw under Windows 7 32bit), no error was presented,
 and the object a.exe was generated.

 My env:

 Tiedtke@Tiedtke-Note ~
 $ gcc -v
 Using built-in specs.
 COLLECT_GCC=C:\MinGW\bin\gcc.exe

 COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.7.0/lto-wrapper.exe
 Target: mingw32
 Configured with: ../gcc-4.7.0/configure
 --enable-languages=c,c++,ada,fortran,obj
 c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared
 --enable-libgo
 mp --disable-win32-registry --enable-libstdcxx-debug
 --disable-build-poststage1-
 with-cxx --enable-version-specific-runtime-libs --build=mingw32
 --prefix=/mingw
 Thread model: win32
 gcc version 4.7.0 (GCC)

 Regards,

 Tiedtke


 2012/10/18 Umberto Nicoletti umberto.nicole...@gmail.com

 Could you try to compile the following code:

 /* begin */
 int
 main ()
 {
 int x;__sync_fetch_and_add(x,1);
   ;
   return 0;
 }
 /* end */

 How to compile: save to test.c and then run:

 gcc test.c

 Best regards,
 Umberto

 On Thu, Oct 18, 2012 at 1:01 PM, Thiago Tiedtke dos Reis 
 tied...@gmail.com wrote:

 Hi,

 I having the same problem when trying to compile the mapserver with
 msys/mingw under Ms windows 7 32bit.

 Regards,

 Thiago Tiedtke dos Reis
 Em 17/10/2012 14:32, Umberto Nicoletti umberto.nicole...@gmail.com
 escreveu:

  David,
 what is your os/platform?

 On Oct 17, 2012 6:30 PM, David Quinn daithiqu...@gmail.com wrote:
 
  Hello List,
 
  I'm getting the following error when I try to compile
 mapserver-6.2.0-rc1
 
  $make
  /bin/sh ./libtool --mode=link --tag=CXX g++ -rpath /home/david/lib
  shp2img.lo libmapserver.la -o shp2img
  libtool: link: g++ .libs/shp2img.o -o .libs/shp2img
  ./.libs/libmapserver.so -L/home/david/lib /home/david/lib/libgd.so
  -L/usr/lib /home/david/lib/libproj.so /home/david/lib/libgdal.so
  -L/home/david -L/usr/kerberos/lib /usr/lib/libexpat.so
  /home/david/lib/libgif.so /home/david/lib/libcurl.so
  /home/david/lib/libgeos_c.so /home/david/lib/libgeos.so
  /home/david/lib/libxml2.so /home/david/lib/libfreetype.so
  -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcairo -lXpm -lfontconfig
  -lpng12 -lsqlite3 -lodbc -lodbcinst -ljpeg -lpng -lpq -lpthread -lSM
  -lICE -lX11 -lidn -lldap -lrt -lssl -lcrypto -ldl -lz -lbz2 -Wl,-rpath
  -Wl,/home/david/lib
  ./.libs/libmapserver.so: undefined reference to
 `__sync_sub_and_fetch_4'
  collect2: ld returned 1 exit status
  make: *** [shp2img] Error 1
 
  I originally got this error message: /usr/bin/ld: warning:
  libcurl.so.3, needed by /home/david/lib/libgdal.so, may conflict with
  libcurl.so.4 so I installed gdal from trunk, and reinstalled freetype,
  giflib and libcurl
 
  I've also attached the output from my ./configure command:
 
 
  -- Compiler Info -
C compiler:gcc -g-Wall
 -Wdeclaration-after-statement
C++ compiler:  g++ -g-Wall
Debug: -g
Generic NINT:
 
   -- Renderer Settings -
OpenGL support:
zlib support:
png support:   -DUSE_PNG
gif support:   -DUSE_GIF
jpeg support:  -DUSE_JPEG
freetype support:  -DUSE_FREETYPE
iconv support: -DUSE_ICONV
AGG support:   internal
GD support:-DUSE_GD  -DUSE_GD_PNG -DUSE_GD_JPEG
 -DUSE_GD_GIF
Cairo (SVG,PDF) support:   -DUSE_CAIRO
Cairo SVG symbol support:
KML support:   -DUSE_KML
 
   -- Support Libraries -
Proj.4 support:-DUSE_PROJ
Proj Fastpaths:
Libxml2 support:   -DUSE_LIBXML2
FriBidi support:
Curl support:  -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH
FastCGI support:
Exempi support:
Threading support:
GEO



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


Re: [mapserver-users] undefined reference to `__sync_sub_and_fetch_4'

2012-10-17 Thread Umberto Nicoletti
David,
what is your os/platform?

On Oct 17, 2012 6:30 PM, David Quinn daithiqu...@gmail.com wrote:

 Hello List,

 I'm getting the following error when I try to compile mapserver-6.2.0-rc1

 $make
 /bin/sh ./libtool --mode=link --tag=CXX g++ -rpath /home/david/lib
 shp2img.lo libmapserver.la -o shp2img
 libtool: link: g++ .libs/shp2img.o -o .libs/shp2img
 ./.libs/libmapserver.so -L/home/david/lib /home/david/lib/libgd.so
 -L/usr/lib /home/david/lib/libproj.so /home/david/lib/libgdal.so
 -L/home/david -L/usr/kerberos/lib /usr/lib/libexpat.so
 /home/david/lib/libgif.so /home/david/lib/libcurl.so
 /home/david/lib/libgeos_c.so /home/david/lib/libgeos.so
 /home/david/lib/libxml2.so /home/david/lib/libfreetype.so
 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcairo -lXpm -lfontconfig
 -lpng12 -lsqlite3 -lodbc -lodbcinst -ljpeg -lpng -lpq -lpthread -lSM
 -lICE -lX11 -lidn -lldap -lrt -lssl -lcrypto -ldl -lz -lbz2 -Wl,-rpath
 -Wl,/home/david/lib
 ./.libs/libmapserver.so: undefined reference to `__sync_sub_and_fetch_4'
 collect2: ld returned 1 exit status
 make: *** [shp2img] Error 1

 I originally got this error message: /usr/bin/ld: warning:
 libcurl.so.3, needed by /home/david/lib/libgdal.so, may conflict with
 libcurl.so.4 so I installed gdal from trunk, and reinstalled freetype,
 giflib and libcurl

 I've also attached the output from my ./configure command:


 -- Compiler Info -
   C compiler:gcc -g-Wall -Wdeclaration-after-statement
   C++ compiler:  g++ -g-Wall
   Debug: -g
   Generic NINT:

  -- Renderer Settings -
   OpenGL support:
   zlib support:
   png support:   -DUSE_PNG
   gif support:   -DUSE_GIF
   jpeg support:  -DUSE_JPEG
   freetype support:  -DUSE_FREETYPE
   iconv support: -DUSE_ICONV
   AGG support:   internal
   GD support:-DUSE_GD  -DUSE_GD_PNG -DUSE_GD_JPEG
-DUSE_GD_GIF
   Cairo (SVG,PDF) support:   -DUSE_CAIRO
   Cairo SVG symbol support:
   KML support:   -DUSE_KML

  -- Support Libraries -
   Proj.4 support:-DUSE_PROJ
   Proj Fastpaths:
   Libxml2 support:   -DUSE_LIBXML2
   FriBidi support:
   Curl support:  -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH
   FastCGI support:
   Exempi support:
   Threading support:
   GEOS support:  -DUSE_GEOS
   XML Mapfile support:
   XSLT support:
   EXSLT support:

  -- Data Format Drivers ---
   PostGIS support:   -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION
   ArcSDE support:
   OGR support:   -DUSE_OGR
   GDAL support:  -DUSE_GDAL
   Oracle Spatial support:

  -- OGC Services --
   WMS Server:-DUSE_WMS_SVR
   WMS Client:-DUSE_WMS_LYR
   WFS Server:-DUSE_WFS_SVR
   WFS Client:-DUSE_WFS_LYR
   WCS Server:-DUSE_WCS_SVR
   SOS Server:

  -- MapScript -
   PHP MapScript: yes
   Python MapScript:  no

 -David
 ___
 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] mapscript.jar error in servlet project

2012-10-09 Thread Umberto Nicoletti
Since you're on windows it could be a locking issue: one process locked the
file and mapserver can't therefore access it.
Are there other programs accessing that same file?

regards,
Umberto

On Wednesday, October 10, 2012, forest21000 wrote:

Hello,Everyone!I am using mapscript.jar in my servlet project to
 generate tilemap in realtime.And lots of time it works very well.But
 sometimes,I came across the eroor like this:

  * Java.lang.UnknowError:msDrawMap():Image handling error.Failed to
 draw
 layer named 'REGION';msShapefileOpen():Unable to access file
 (D:\Ocean_region);msShapefileOpen():Unable to access
 file.(D:\Ocean_region.shp)*

   Is it the multi-thread problem?Waiting for your answers!Thanks for your
 help!




 --
 View this message in context:
 http://osgeo-org.1560.n6.nabble.com/mapscript-jar-error-in-servlet-project-tp5007566.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org javascript:;
 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] mapscript.jar in java

2012-09-11 Thread Umberto Nicoletti
Please note that growing memory usage is not necessarily symptom of a
problem. On the other hand memory not being released IS a problem.

Invoking programmatically the garbage collector does nothing towards
addressing memory leaks and, almost certainly in both cases, will
reduce the overall JVM performance.

As far as memory leaks are concerned Mapserver/Mapscript should be
mostly leak free, but ymmv depending on the features you are using.
If you are afraid (or know) that mapscript is leaking memory please
run it through Valgrind, then open an issue with both a test case and
a Valgrind output.

Best regards,
Umberto


On Tue, Sep 11, 2012 at 4:30 PM, Gaston Lucero gaston.luce...@gmail.com wrote:

 I use System.gc() before  map.Draw() And the memory remains stable,
 Currently I use Java 7, but earlier in java 6 also works
 System.gc has several improvements in Java 7, you should try it

 ___
 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] Python MapScript compile error

2012-07-04 Thread Umberto Nicoletti
python mapscript now requires swig 2.x: install it then rerun configure and
make

hth,
Umberto

On Thursday, July 5, 2012, Jackey Cheung wrote:

 Hi all,

 Not sure if i've done anything wrong. I've met the Unknown option: -a
 while compiling Python MapScript.

 MapServer: Git trunk, CentOS 6 box running on Intel Pentium D.
 ./configure --with-wms --with-wfs --with-curl --with-jpeg --with-freetype
 --with-png --with-threads --with-postgis --with-xml2 --with-libiconv
 --with-proj --with-ogr --with-gdal --with-cairo --with-ftgl --with-opengl
 --with-threads --with-geos --with-postgis --with-mysql --with-wmsclient
 --with-wfsclient --with-sos --with-wcs --with-curl --with-kml
 --with-xml-mapfile --with-xslt --with-fastcgi --with-exempi
 --with-fribidi-config --with-zlib --with-gd --with-postgis --with-mysql
 --with-php --with-libsvg-cairo --enable-fast-nint --enable-proj-fastpath
 --enable-point-z-m --enable-python-mapscript

 Although I don't need all these features yet, I've decided to test
 compiling all of them in case I need them in future. Configure went well,
 and finished with everything. But while compiling Python:
 cd mapscript/python; make;
 make[1]: Entering directory
 `/home/jackey.cheung/mapserver-6.2.0-beta1/mapscript/python'
 python -shadow -modern -templatereduce -fastdispatch -fvirtual -fastproxy
 -modernargs -castmode -dirvtable -fastinit -fastquery -noproxydel
 -nobuildnone -DUSE_PROJ_FASTPATHS  -DUSE_POINT_Z_M  -DUSE_FASTCGI
 -DUSE_SVG_CAIRO -DUSE_CAIRO -DUSE_FRIBIDI -DUSE_FRIBIDI2 -DUSE_EXSLT
 -DUSE_XSLT -DUSE_XMLMAPFILE -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_SOS_SVR
 -DUSE_LIBXML2 -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_EXEMPI
 -DUSE_WCS_SVR -DUSE_WFS_SVR -DUSE_WMS_SVR  -DUSE_MYSQL -DUSE_POSTGIS
 -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_GEOS
  -DHAVE_SYNC_FETCH_AND_ADD -DUSE_THREAD -DUSE_PROJ -DUSE_OGL -DUSE_FTGL
  -DUSE_GD  -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_GIF -DUSE_ICONV -DUSE_JPEG
 -DUSE_GIF -DUSE_PNG -DUSE_FREETYPE -DHAVE_VSNPRINTF -DNEED_STRLCPY
 -DNEED_STRLCAT -DNEED_STRRSTR   -DDISABLE_CVSID -o mapscript_wrap.c
 ../mapscript.i
 Unknown option: -a
 usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
 Try `python -h' for more information.

 Any clue?

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


Re: [mapserver-users] Mapscript Java Interface for 64 Bit Java Version?

2012-06-13 Thread Umberto Nicoletti
Jacob,
64-bit is supported only there are no binaries for Windows (at least that I
know of).

You could try build it yourself by following these instructions:

http://mapserver.org/installation/win32.html

hth,
Umberto



On Mon, Jun 11, 2012 at 1:44 PM, Jacob Mendt 
jacob.me...@mailbox.tu-dresden.de wrote:

  Hello List.

 I appreciate the work which is done around the mapserver. Right now I try
 to use the java mapscript interface and I got the following issue.

 I already got the java mapscript interface running. But right now it is
 only working with a 32-bit java version. My question is now, if there is
 also any support for 64-bit java version? 

 My runtime environment is:

 -  Windows 7 (64 bit)

 -  MS4W v3.0.2 packet (Mapscript 5.6.6.)

 -  Java Version: 1.7.0_0.4 (32-bit)

 I am looking forward to hear from you.

 Kind regards,

 JM

 ___
 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] Mapscript Java Interface for 64 Bit Java Version?

2012-06-13 Thread Umberto Nicoletti
Tamas, thanks for the link.

Recently I was working on:

https://github.com/mapserver/mapserver/issues/4231

and had some trouble with Windows builds because I simply don't have a
build env for Windows and had to ask jmckenna to pull and build for me.
So I ended up with a gcc only fix.

Any chance that I can use the build tools ot that link so that I can fix
the issue  for Windows too?

Cheers,
Umberto

On Wed, Jun 13, 2012 at 9:01 AM, Tamas Szekeres szeker...@gmail.com wrote:

 Jacob,

 As far as I remember the gisinternals build server compiles java mapscript
 for x64.
 http://www.gisinternals.com/sdk/

 Best regards,

 Tamas



 2012/6/11 Jacob Mendt jacob.me...@mailbox.tu-dresden.de

  Hello List.

 I appreciate the work which is done around the mapserver. Right now I try
 to use the java mapscript interface and I got the following issue.

 I already got the java mapscript interface running. But right now it is
 only working with a 32-bit java version. My question is now, if there is
 also any support for 64-bit java version? 

 My runtime environment is:

 -  Windows 7 (64 bit)

 -  MS4W v3.0.2 packet (Mapscript 5.6.6.)

 -  Java Version: 1.7.0_0.4 (32-bit)

 I am looking forward to hear from you.

 Kind regards,

 JM

 ___
 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] Failed to connect to github

2012-06-03 Thread Umberto Nicoletti
Andrea,
are you behind a proxy?

http://stackoverflow.com/questions/128035/how-do-i-pull-from-a-git-repository-through-an-http-proxy

On Sunday, June 3, 2012, Andrea Peri wrote:

 Hi,
 thx for response.

 I try your sintax, but it don't seem work anymore. :(

 * Failed connect to github.com:8080; Operation now in progress
 * Expire cleared
 * Closing connection #0
 error: Failed connect to github.com:8080; Operation now in progress
 while accessing https://github.com/mapserver/mapserver.git/info/refs

 fatal: HTTP request failed


 2012/6/3 Thomas Gratier osgeo.mailingl...@gmail.com javascript:_e({},
 'cvml', 'osgeo.mailingl...@gmail.com');

 Hello,

 This below will be better :)
 git clone https://github.com/mapserver/mapserver.git mapserver-svn

 Regards

 ThomasG




 --
 -
 Andrea Peri
 . . . . . . . . .
 qwerty àèìòù
 -


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


Re: [mapserver-users] Fail to build Mapscript Python with current source

2012-04-27 Thread Umberto Nicoletti
I just built it on Ubuntu 10.04 x86, perhaps you should try this build
process:

./configure [your options] --enable-python-mapscript
make
sudo make install

make/make install will also build and install python mapscript, no need to
cd, swig, etc.

Umberto

On Fri, Apr 27, 2012 at 3:04 PM, Peter Hopfgartner 
peter.hopfgart...@r3-gis.com wrote:

 I'm on a CentOS 6.2, x86_64 bit system:

 /configure --with-gd --with-zlib --with-tiff --with-agg
 --with-experimental-png --with-freetype=/usr/bin/**freetype-config
 --with-gdal=/usr/bin/gdal-**config --with-ogr=/usr/bin/gdal-**config
 --with-geos=/usr/bin/geos-**config --with-cairo=yes --with-proj
 --with-wfs --with-wcs --with-sos --with-wmsclient --with-wfsclient
 --with-xpm --with-postgis=/usr/bin/pg_**config
 --with-mygis=/usr/bin/mysql_**config --with-curl-config=/usr/bin/**curl-config
 --with-xml2-config=/usr/bin/**xml2-config --with-php=/usr/bin/php-config
 --with-fribidi-config=/usr/**lib64/pkgconfig/fribidi.pc
 --with-fastcgi=/usr --without-pdf --without-eppl --with-threads
 --enable-debug --disable-runpath

 cd mapscript/python
 swig -python -shadow -modern -o mapscript_wrap.c ../mapscript.i
 cd ../..
 make
 cd mapscript/python
 python setup.py build

 The build fails with:

 gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
 -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
 --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv
 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
 -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DUSE_FASTCGI=1 -DUSE_CAIRO=1
 -DUSE_FRIBIDI=1 -DUSE_FRIBIDI2=1 -DUSE_WMS_LYR=1 -DUSE_WFS_LYR=1
 -DUSE_SOS_SVR=1 -DUSE_LIBXML2=1 -DUSE_CURL=1 -DUSE_CURLOPT_PROXYAUTH=1
 -DUSE_WCS_SVR=1 -DUSE_WFS_SVR=1 -DUSE_WMS_SVR=1 -DUSE_POSTGIS=1
 -DPOSTGIS_HAS_SERVER_VERSION=1 -DUSE_GDAL=1 -DUSE_OGR=1 -DUSE_GEOS=1
 -DUSE_THREAD=1 -DUSE_PROJ=1 -DUSE_GD=1 -DUSE_GD_GIF=1 -DUSE_GD_PNG=1
 -DUSE_GD_JPEG=1 -DUSE_GD_WBMP=1 -DUSE_GD_FT=1 -DGD_HAS_FTEX_XSHOW=1
 -DGD_HAS_GDIMAGEGIFPTR=1 -DGD_HAS_GETBITMAPFONTS=1
 -DGD_HAS_GET_TRUE_COLOR_PIXEL=**1 -DUSE_ICONV=1 -DUSE_JPEG=1 -DUSE_GIF=1
 -DUSE_PNG=1 -DUSE_ZLIB=1 -DUSE_FREETYPE=1 -DHAVE_VSNPRINTF=1
 -DNEED_STRLCPY=1 -DNEED_STRLCAT=1 -DNEED_STRRSTR=1 -DDISABLE_CVSID=1
 -I../.. -I/usr/include/freetype2 -Irenderers/agg/include
 -I/usr/include/gdal -I/usr/include -I/usr/include/fastcgi
 -I/usr/include/libxml2 -I/usr/include/fribidi -I/usr/include/cairo
 -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/python2.6
 -I/home/rpmbuild/tmp/**mapserver-6.1.20120426 -c pygdioctx/pygdioctx.c -o
 build/temp.linux-x86_64-2.6/**pygdioctx/pygdioctx.o
 pygdioctx/pygdioctx.c: In function ‘PyFileIfaceObj_IOCtx_GetBuf’:
 pygdioctx/pygdioctx.c:84: warning: passing argument 3 of
 ‘PyString_AsStringAndSize’ from incompatible pointer type
 /usr/include/python2.6/**stringobject.h:172: note: expected ‘Py_ssize_t
 *’ but argument is of type ‘int *’
 gcc -pthread -shared build/temp.linux-x86_64-2.6/**mapscript_wrap.o
 build/temp.linux-x86_64-2.6/**pygdioctx/pygdioctx.o -L../../ -L/usr/lib64
 -L/usr/lib64 -L/usr/lib -L/usr/lib64 
 -L/home/rpmbuild/tmp/**mapserver-6.1.20120426
 -lpython2.6 -lmapserver -lfreetype -lgd -ljpeg -lpng -lz -lXpm -lX11 -lproj
 -lgif -lgdal -lpq -lcurl -lgeos_c -lpthread -lc -lfcgi -lxml2 -lm -lfribidi
 -lstdc++ -lfontconfig -lcairo -lpng12 -lmapserver -o
 build/lib.linux-x86_64-2.6/_**mapscript.so
 /usr/bin/ld: cannot find -lmapserver
 collect2: ld returned 1 exit status
 error: command 'gcc' failed with exit status 1

 Anyway, there is a file libmapserver.la in the source directory.

 What is it, that I'm mising?

 Thanks,

 Peter

 --
 Peter Hopfgartner
 web  : http://www.r3-gis.com

 __**_
 mapserver-users mailing list
 mapserver-users@lists.osgeo.**org mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/**mailman/listinfo/mapserver-**usershttp://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 Layer Filter

2012-01-12 Thread Umberto Nicoletti
Even better: use solution 3, but create a view on the database and query
the view instead.
I'm not sure if it can be done it but I guess that a malicious user could
trick mapserver and add a filter like ' OR 1=1 ' and in that case ALL
features (including GROFT) will be shown.

HTH,
Umberto

On Fri, Jan 13, 2012 at 1:09 AM, Gabe Codina g...@agtrix.com wrote:

 We do something similar here is how we implement your solution 3

 ** **

 CONNECTIONTYPE PLUGIN

 PLUGIN .\msplugin_mssql2008.dll

 CONNECTION
 server=SERVER\MSSQL;uid=USERID;pwd=PASSWORD;database=DATABASE;Integrated
 Security=false

 DATA gExtent FROM (SELECT * FROM tm_points WHERE type!=’GRØFT’)AS
 FOO USING UNIQUE [iId] USING SRID=4326

 ** **

 ** **

 Note the connection string needs to access your MSSQL Instance and the
 plugin dll  must be available the format of the data statement lets you put
 quite a complex SQL statement inside the ()s.

 ** **

 Gabe Codina

 ** **

 ** **

 *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
 mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Hawk AA
 *Sent:* Friday, 13 January 2012 3:24 AM
 *To:* mapserver-users@lists.osgeo.org
 *Subject:* [mapserver-users] Mapserver Layer Filter

 ** **

 Hi there, Mailing List,

 ** **

 We have a customer that wants their maps to be published online, but some
 of the features is confidential and should not be displayed.

 ** **

 We have added following to the layer definition:

 FILTER ('[type]' != GRØFT )

 It works, the features with type GRØFT are not showed in the map.

 ** **

 However, we have a window that let the user browse the data, and it will
 be possible to access the features of type GRØFT. When you press “show in
 map”, the JavaScript clients triggers a WFS request with a filter asking
 for elements with the current ID. By doing this, WFS omits the LAYER FILTER
 definition, so the element can be showed in the map, even if it is of type
 GRØFT. I need a way to make sure the WFS can’t deliver any data of type
 GRØFT.

 ** **

 I’ve seen three possible solutions:

 **1.   **We have a service that automatically converts uploaded
 MapInfo *.TAB-files to SHP. If I am correct, I could use the
 “-where”-argument on the ogr2ogr to filter data and only get features which
 does not have type GRØFT. I hope I do not have to do this, since debugging
 and developing a windows service is quite tricky.

 **2.   **Add additional filter values to the WFS query. I could also
 define the types not to show in the JavaScript, and let the application
 automatically add PropertyIsNotEqualTo-tags to the AJAX query. This would
 be less secure, and I need to define types not to show at two places.

 **3.   **The best solution in my eyes is to let the magic happen in
 the MAP-file, and that is mostly why I am posting here. Is there a way to
 add a query to the Layer Data definition, like you do if you are querying a
 MSSQL database? I can imagine a syntax like this:
 CONNECTIONTYPE OGR
 CONNECTION TM_Nett/TM_Points
 DATA SELECT * FROM tm_points WHERE type!=’GRØFT’”
 It does not seem to work.

 ** **

 Any suggestions, especially regarding the third solution?

 ** **

 Best regards,

 Håkon Åmdal

 ** **

 ** **

 ___
 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] mapscript - java exception

2011-07-20 Thread Umberto Nicoletti
The reason is that the servlet container is trying to serialize your
session and the mapscript objects are not serializable.
Also remember that, although it might work for some use cases, storing
mapscript objects in session and reusing them is not the recommended
best practice.

hth,
umberto

On Tuesday, July 19, 2011, ahmet temiz ahmettemi...@gmail.com wrote:
 hello

 I am dealing with mapscript - java.

 I received this error message.
 Could you tell me what the reason might be ?

 regards


 Caused by: java.io.NotSerializableException: edu.umn.gis.mapscript.mapObj
         at 
 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
         at 
 java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
         at 
 java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
         at 
 java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
         at 
 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
         at 
 org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1676)

 --
 Ahmet Temiz
 Jeoloji Müh.
 Afet ve Acil Durum Yönetimi Başkanlığı
 Planlama ve Zarar Azaltma Dairesi Başkanlığı
 Bilgi ve CBS grubu
 Eskişehir Yolu 10. km.
 Lodumlu / Ankara
 Tel : 0 312 2872680 / 1535
 

 Ahmet Temiz
 Geological Eng.
 Information Systems - GIS Group
 Disaster and Emergency Management
 of Presidency
 ___
 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] confused about mapscript java configuration

2011-05-20 Thread Umberto Nicoletti
Ahmet,
you gave the wrong param to with-java-include-os-name and usually it is not
necessary to specify anything as it will correctly guess from the
environment.
Try this:

set JAVA_HOME to point to the jdk (NOTE: a full JDK is required, JRE is NOT
enough)
run ./configure (leave with-java-include-os-name out for now)
make
cd mapscript/java
make clean
make

HTH,
Umberto

2011/5/19 ahmet temiz ahmettemi...@gmail.com

 hello

 I think I am confused about mapscript java configuration

 I added my configuration file
 --with-java-include-os-name=$JAVA_HOME/include

 But It still cannot find jni.h

 I checked $JAVA_HOME:

 orkun@orkun-HP:~$ ls $JAVA_HOME/include/
 classfile_constants.h  jawt.h  jdwpTransport.h  jni.h  jvmti.h  linux
 // jni.h seems to exist.


 what might have caused the problem ?

 regards
 --
 Ahmet Temiz
 Jeoloji Müh.
 Afet ve Acil Durum Yönetimi Başkanlığı
 Planlama ve Zarar Azaltma Dairesi Başkanlığı
 Bilgi ve CBS grubu
 Eskişehir Yolu 10. km.
 Lodumlu / Ankara
 Tel : 0 312 2872680 / 1535
 

 Ahmet Temiz
 Geological Eng.
 Information Systems - GIS Group
 Disaster and Emergency Management
 of Presidency
 ___
 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] confused about mapscript java configuration

2011-05-20 Thread Umberto Nicoletti
good catch, that's probably because of some of the recent changes in the
mapserver codebase.
please open a ticket and address it to me, i'll fix it asap.

BR,
Umberto


2011/5/20 ahmet temiz ahmettemi...@gmail.com

 Thank you  Umberto ,

 I did.

 It constructed libmapscript.so, and   mapscript.jar.

  make test passes.
 But, make threadtests gave

 orkun@orkun-HP:~/data/mapserver-6.0.0/mapscript/java$ make threadtests
 javac -cp ./mapscript.jar -d tests/threadtest/ tests/threadtest/*.java
 tests/threadtest/MapThread.java:60: cannot find symbol
 symbol  : method getFeature(int,int)
 location: class edu.umn.gis.mapscript.layerObj
shapeObj shape=layer.getFeature(0,-1);
^
 1 error
 make: *** [threadtests] Error 1

 how can I solve this problem ?

 regards


 20 Mayıs 2011 10:15 tarihinde Umberto Nicoletti
 umberto.nicole...@gmail.com yazdı:
  Ahmet,
  you gave the wrong param to with-java-include-os-name and usually it is
 not
  necessary to specify anything as it will correctly guess from the
  environment.
  Try this:
  set JAVA_HOME to point to the jdk (NOTE: a full JDK is required, JRE is
 NOT
  enough)
  run ./configure (leave with-java-include-os-name out for now)
  make
  cd mapscript/java
  make clean
  make
  HTH,
  Umberto
  2011/5/19 ahmet temiz ahmettemi...@gmail.com
 
  hello
 
  I think I am confused about mapscript java configuration
 
  I added my configuration file
  --with-java-include-os-name=$JAVA_HOME/include
 
  But It still cannot find jni.h
 
  I checked $JAVA_HOME:
 
  orkun@orkun-HP:~$ ls $JAVA_HOME/include/
  classfile_constants.h  jawt.h  jdwpTransport.h  jni.h  jvmti.h  linux
  // jni.h seems to exist.
 
 
  what might have caused the problem ?
 
  regards
  --
  Ahmet Temiz
  Jeoloji Müh.
  Afet ve Acil Durum Yönetimi Başkanlığı
  Planlama ve Zarar Azaltma Dairesi Başkanlığı
  Bilgi ve CBS grubu
  Eskişehir Yolu 10. km.
  Lodumlu / Ankara
  Tel : 0 312 2872680 / 1535
  
 
  Ahmet Temiz
  Geological Eng.
  Information Systems - GIS Group
  Disaster and Emergency Management
  of Presidency
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 



 --
 Ahmet Temiz
 Jeoloji Müh.
 Afet ve Acil Durum Yönetimi Başkanlığı
 Planlama ve Zarar Azaltma Dairesi Başkanlığı
 Bilgi ve CBS grubu
 Eskişehir Yolu 10. km.
 Lodumlu / Ankara
 Tel : 0 312 2872680 / 1535
 

 Ahmet Temiz
 Geological Eng.
 Information Systems - GIS Group
 Disaster and Emergency Management
 of Presidency

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


Re: [mapserver-users] Mapserver usage with commercial vendors data

2011-05-03 Thread Umberto Nicoletti
On Fri, Apr 29, 2011 at 3:19 PM, Paolo Crosato paolo.cros...@ubiest.comwrote:

  Hi,

 I work for an LBS based company, we have our own proprietary rendering
 engine for producing maps, and we work mainly with data from Navteq and
 Teleatlas. Presently our rendering engine is behind the competition in terms
 of visual quality (we have a bad support for antialiasing, label names with
 both native and transliterate names are missing, and so on). Introducing new
 features in our current rendering architecture would require quite a lot of
 coding and re-engineering, so we are looking for alternative renderers,
 possibly open sourced. During this research project I came across Mapserver,
 and it seems it would suit our needs in terms of high quality rendering and
 customization.
 However, there are still some open issues, mainly questions, I'd like to
 ask.

 In regards to rendering:
 1) Is there any way to align labels in different encondings for the same
 city? I mean something like writing Москва́ and *Moskvá *vertically
 aligned, like on Google Maps.
 2) Is there any plan to support 2.5D rendering for buildings?

 In regards to working with high loads of data:
 1) We render our maps from data provided by vendors like Navteq, and they
 have a lot of details and features. Is there anyone working in the same
 field, who could share some of his experience?
 2) Is it more efficient to work with PostGis/Oracle Spatial or with
 shapefiles? I suppose the former would be faster, since shapefiles provided
 by Navteq would require about 100gigs for Europe only, just to store the
 data.


As Thomas said probably a database like Postgis or Oracle (if your budget
allows for the hefty license fee) is a sensible choice because it makes
complex manipulations (like adding a translation for a label) easy.
In that case a machine dedicated to the db backend with a fast network (GB
or better) link to the rendering workstation is also *probably* recommended
to free CPU resources and memory (for caching resultsets) on the rendering
side (but that depends on your queries).
If a query is particularly CPU or I/O intensive consider using a
materialized view instead (Oracle has builtin support, postgres not yet but
it can be done).

3) In regards to the hardware, I reckon we would need at least one
 workstation dedicated to rendering. Currently we are hosting our rendering
 service on dual Xeon (quad core), with 16G of ram and SAS arrays of hard
 disks, would one server like this be ok or would it be better to have more
 machines, especially if planning to use RDBMS to hold the data? I'm asking
 this because with currently work with detailed data from Europe, North and
 South America, so it's quite a lot of stuff :)


One issue to consider (might not be critical, just informing you) is that
mapserver will perform the layer rendering serially.
Another is that disks are only involved when it is writing the image to a
file so I would also think about saving money on disks and get more servers
instead or use a fast primary for file generation (think SSD) and then move
them async'ly to a slower (but cheaper) storage (think NFS).
Last: too much ram might never get used because of the cpu bottleneck
kicking in before so I would also make sure that I could shuffle ram around
if necessary (i.e.: one server's CPUs are consistently maxed out, but memory
isn't: in that case I would buy a new server and move memory to the new one
instead of buying more and waste it).

HTH,
Umberto


 Thanks in advance for any feedback.

 Regards,

 Paolo Crosato

 --

 Paolo Crosato
 Ubiest SPAhttp://www.ubiest.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: Re: [mapserver-users] MapServer 6.0.0-beta2 release: problems building Java MapScript

2011-03-20 Thread Umberto Nicoletti
committed yesterday into trunk

On Sat, Mar 19, 2011 at 2:55 PM, Lime, Steve D (DNR) steve.l...@state.mn.us
 wrote:

 Changes should go into trunk... Steve
 
 From: mapserver-users-boun...@lists.osgeo.org [
 mapserver-users-boun...@lists.osgeo.org] On Behalf Of Umberto Nicoletti [
 umberto.nicole...@gmail.com]
 Sent: Saturday, March 19, 2011 5:37 AM
 To: peter.hopfgart...@r3-gis.com; Daniel Morissette
 Cc: mapserver-users
 Subject: Re: Re: [mapserver-users] MapServer 6.0.0-beta2 release: problems
  building Java MapScript

 I'm still working on it as it seems there is a memory problem (the tests
 crash consistently), but unless you create map, layers and other object
 programmatically you should be fine.

 @daniel: where should I commit the changes?

 Cheers,
 Umberto

 On Sat, Mar 19, 2011 at 11:19 AM, Peter Hopfgartner 
 peter.hopfgart...@r3-gis.commailto:peter.hopfgart...@r3-gis.com wrote:
 Seems good.

 Thanks,

 Peter

 R3 GIS Srl - GmbH
 http://www.r3-gis.com


 Umberto Nicoletti umberto.nicole...@gmail.commailto:
 umberto.nicole...@gmail.com wrote
 Subject: Re: [mapserver-users] MapServer 6.0.0-beta2 release: problems
 building Java MapScript
 Date: 19.03.2011 09:59

 Try the attached patch and if it works I will commit the changes.
 The Makefile.in for java mapscript is probaly missing other defines from
 the
 main Makefile, I'm looking into it right now.
 
 Regards,
 Umberto
 
 On Sat, Mar 19, 2011 at 9:19 AM, Peter Hopfgartner 
 peter.hopfgart...@r3-gis.commailto:peter.hopfgart...@r3-gis.com wrote:
 
  On CentOS 5.5:
 
  After running
 
  ./configure --with-gd --with-zlib --with-tiff --with-freetype
 --with-gdal
  --with-ogr --with-geos --with-proj --with-sos --with-wfs --with-wcs
  --with-wmsclient --with-wfsclient --with-xpm --with-agg --with-cairo
  --with-postgis --with-curl-config --with-xml2-config --with-threads
  --enable-debug
 
  in mapscript/java/Makefile I've found the following, which causes some
  troubles afterwards:
 
  AGG= @AGG_ENABLED@
  AGG_INC=  -Irenderers/agg/include
 
  (...)
  PDF_INC=  @PDF_INC@
  PDF_LIB=  @PDF_LIB@
  PDF=  @PDF_ENABLED@
 
 
  I have the same situation with Ubuntu 10.04 on current SVN, as of now.
 
  Unfortunatly my autoconf skills are very low, so I not really know how
 to
  provide a fix or better diagnosis.
 
  Peter
 
  R3 GIS Srl - GmbH
  http://www.r3-gis.com
 
 
  Daniel Morissette dmorisse...@mapgears.commailto:
 dmorisse...@mapgears.com wrote
  Subject: [mapserver-users] MapServer 6.0.0-beta2 release
  Date: 18.03.2011 20:48
 
  Thanks to the hard work from everyone during the Montreal Code Sprint
  this week (http://wiki.osgeo.org/wiki/Montreal_Code_Sprint_2011), the
  MapServer Team is pleased to announce the release of MapServer
  6.0.0-beta2. This is the latest beta on our way to a final 6.0
 release,
  and includes a large number of fixes made during the Montreal Code
  Sprint.
  
  The 6.0 release introduces important changes in key components of the
  MapServer core (rendering, query and expressions), and for this reason
  we count on you, MapServer power users, to help test the release in
 your
  respective environments and provide feedback (through the users list
 or
  Trac tickets).
  
  This is the second of four planned beta releases and if all goes well
 a
  final release should occur around the end of April. The full release
  plan which also includes the list of new features and changes in this
  release is available at:
  
 http://mapserver.org/trunk/development/release/release-plan-6.0.html
  
  The list of fixes since beta1 is attached at the end of this message.
  For a complete list see the HISTORY.TXT file at:
  
  
  
 
 
 http://trac.osgeo.org/mapserver/browser/tags/rel-6-0-0-beta2/mapserver/HISTORY.TXT
  
  We have started working on a 5.6 - 6.0 migration guide. This document
  contains important notes on backwards incompatibilities or other
 changes
  required when upgrading to 6.0. It is not complete yet but we strongly
  recommend that you review the latest version online at:
  
   http://mapserver.org/trunk/MIGRATION_GUIDE.html
  
  The source for this release can be downloaded at:
  
   http://mapserver.org/download.html
  or
   http://download.osgeo.org/mapserver/mapserver-6.0.0-beta2.tar.gz
  
  The binary distributions listed in the download page should be updated
  with binaries for the new beta release in the next day or so.
  
  Once again we need your help to ensure a high quality product, so
 please
  help out by testing your applications with this new code base.
  
  Thanks! - The MapServer Team
  
  
  Version 6.0.0-beta2 (2011-03-18)
  
  
  - correct scaling of symbol GAP and PATTERN (#3752)
  
  - remove references to SWF/MING
  
  - CGI runtime substitution requires a validation pattern (was optional
 before) (#3522)
  
  - add a default png8 outputformat that uses AGG

Re: [mapserver-users] MapServer 6.0.0-beta2 release: problems building Java MapScript

2011-03-19 Thread Umberto Nicoletti
Try the attached patch and if it works I will commit the changes.
The Makefile.in for java mapscript is probaly missing other defines from the
main Makefile, I'm looking into it right now.

Regards,
Umberto

On Sat, Mar 19, 2011 at 9:19 AM, Peter Hopfgartner 
peter.hopfgart...@r3-gis.com wrote:

 On CentOS 5.5:

 After running

 ./configure --with-gd --with-zlib --with-tiff --with-freetype --with-gdal
 --with-ogr --with-geos --with-proj --with-sos --with-wfs --with-wcs
 --with-wmsclient --with-wfsclient --with-xpm --with-agg --with-cairo
 --with-postgis --with-curl-config --with-xml2-config --with-threads
 --enable-debug

 in mapscript/java/Makefile I've found the following, which causes some
 troubles afterwards:

 AGG= @AGG_ENABLED@
 AGG_INC=  -Irenderers/agg/include

 (...)
 PDF_INC=  @PDF_INC@
 PDF_LIB=  @PDF_LIB@
 PDF=  @PDF_ENABLED@


 I have the same situation with Ubuntu 10.04 on current SVN, as of now.

 Unfortunatly my autoconf skills are very low, so I not really know how to
 provide a fix or better diagnosis.

 Peter

 R3 GIS Srl - GmbH
 http://www.r3-gis.com


 Daniel Morissette dmorisse...@mapgears.com wrote
 Subject: [mapserver-users] MapServer 6.0.0-beta2 release
 Date: 18.03.2011 20:48

 Thanks to the hard work from everyone during the Montreal Code Sprint
 this week (http://wiki.osgeo.org/wiki/Montreal_Code_Sprint_2011), the
 MapServer Team is pleased to announce the release of MapServer
 6.0.0-beta2. This is the latest beta on our way to a final 6.0 release,
 and includes a large number of fixes made during the Montreal Code
 Sprint.
 
 The 6.0 release introduces important changes in key components of the
 MapServer core (rendering, query and expressions), and for this reason
 we count on you, MapServer power users, to help test the release in your
 respective environments and provide feedback (through the users list or
 Trac tickets).
 
 This is the second of four planned beta releases and if all goes well a
 final release should occur around the end of April. The full release
 plan which also includes the list of new features and changes in this
 release is available at:
http://mapserver.org/trunk/development/release/release-plan-6.0.html
 
 The list of fixes since beta1 is attached at the end of this message.
 For a complete list see the HISTORY.TXT file at:
 
 
 
 http://trac.osgeo.org/mapserver/browser/tags/rel-6-0-0-beta2/mapserver/HISTORY.TXT
 
 We have started working on a 5.6 - 6.0 migration guide. This document
 contains important notes on backwards incompatibilities or other changes
 required when upgrading to 6.0. It is not complete yet but we strongly
 recommend that you review the latest version online at:
 
  http://mapserver.org/trunk/MIGRATION_GUIDE.html
 
 The source for this release can be downloaded at:
 
  http://mapserver.org/download.html
 or
  http://download.osgeo.org/mapserver/mapserver-6.0.0-beta2.tar.gz
 
 The binary distributions listed in the download page should be updated
 with binaries for the new beta release in the next day or so.
 
 Once again we need your help to ensure a high quality product, so please
 help out by testing your applications with this new code base.
 
 Thanks! - The MapServer Team
 
 
 Version 6.0.0-beta2 (2011-03-18)
 
 
 - correct scaling of symbol GAP and PATTERN (#3752)
 
 - remove references to SWF/MING
 
 - CGI runtime substitution requires a validation pattern (was optional
before) (#3522)
 
 - add a default png8 outputformat that uses AGG/PNG with quantization
 
 - change MS_INIT_COLOR to take alpha as a parameter
 
 - stop using style-opacity in rendering code, use alpha from colorObjs.
 
 - Fixed big Oracle memory leak when rendering in KML (#3719)
 
 - avoid linking in postgres dependencies unnecessarily (#3708)
 
 - don't initialize outputformats until they are selected
 
 - use seamless creation of tiles for polygon fills with vector symbols
 
 - Ability to escape single/double quotes inside a string (#3706)
 
 - Globally replace msCaseFindSubstring with strcasestr (#3255)
 
 - support GROUP layers in shp2img (#3746)
 
 - Honour MAXSIZE for WCS 2.0 responses (#3204).
 
 - fallback to ows_title for WCS ows:Title of CoverageDescription (#3528)
 
 - Added msIO_stripStdoutBufferContentHeaders() to strip off all
Content-* headers from a buffer (#3673, #3665).
 
 - Added raster classification support for STYLE level OPACITY.
 
 - Allow attribute references, that is [itemname], within a TEXT string
 (#3736)
 
 - Fixed segmentation fault when parsing invalid extent arguments in
shp2img (#3734)
 
 - Make openlayers mode work even without OWS support (#3732)
 
 - Add a static table to define the axis order for soem epsg codes (#3582)
 
 - Add possibility to use KML_NAME_ITEM (#3728)
 
 - Fixed mapfile parsing error when a label angle referenced an attribute
(e.g. ANGLE [angle]) #3727
 
 - Removed executable flag on some source files (#3726)
 
 

Re: Re: [mapserver-users] MapServer 6.0.0-beta2 release: problems building Java MapScript

2011-03-19 Thread Umberto Nicoletti
I'm still working on it as it seems there is a memory problem (the tests
crash consistently), but unless you create map, layers and other object
programmatically you should be fine.

@daniel: where should I commit the changes?

Cheers,
Umberto

On Sat, Mar 19, 2011 at 11:19 AM, Peter Hopfgartner 
peter.hopfgart...@r3-gis.com wrote:

 Seems good.

 Thanks,

 Peter

 R3 GIS Srl - GmbH
 http://www.r3-gis.com


 Umberto Nicoletti umberto.nicole...@gmail.com wrote
 Subject: Re: [mapserver-users] MapServer 6.0.0-beta2 release: problems
 building Java MapScript
 Date: 19.03.2011 09:59

 Try the attached patch and if it works I will commit the changes.
 The Makefile.in for java mapscript is probaly missing other defines from
 the
 main Makefile, I'm looking into it right now.
 
 Regards,
 Umberto
 
 On Sat, Mar 19, 2011 at 9:19 AM, Peter Hopfgartner 
 peter.hopfgart...@r3-gis.com wrote:
 
  On CentOS 5.5:
 
  After running
 
  ./configure --with-gd --with-zlib --with-tiff --with-freetype
 --with-gdal
  --with-ogr --with-geos --with-proj --with-sos --with-wfs --with-wcs
  --with-wmsclient --with-wfsclient --with-xpm --with-agg --with-cairo
  --with-postgis --with-curl-config --with-xml2-config --with-threads
  --enable-debug
 
  in mapscript/java/Makefile I've found the following, which causes some
  troubles afterwards:
 
  AGG= @AGG_ENABLED@
  AGG_INC=  -Irenderers/agg/include
 
  (...)
  PDF_INC=  @PDF_INC@
  PDF_LIB=  @PDF_LIB@
  PDF=  @PDF_ENABLED@
 
 
  I have the same situation with Ubuntu 10.04 on current SVN, as of now.
 
  Unfortunatly my autoconf skills are very low, so I not really know how
 to
  provide a fix or better diagnosis.
 
  Peter
 
  R3 GIS Srl - GmbH
  http://www.r3-gis.com
 
 
  Daniel Morissette dmorisse...@mapgears.com wrote
  Subject: [mapserver-users] MapServer 6.0.0-beta2 release
  Date: 18.03.2011 20:48
 
  Thanks to the hard work from everyone during the Montreal Code Sprint
  this week (http://wiki.osgeo.org/wiki/Montreal_Code_Sprint_2011), the
  MapServer Team is pleased to announce the release of MapServer
  6.0.0-beta2. This is the latest beta on our way to a final 6.0
 release,
  and includes a large number of fixes made during the Montreal Code
  Sprint.
  
  The 6.0 release introduces important changes in key components of the
  MapServer core (rendering, query and expressions), and for this reason
  we count on you, MapServer power users, to help test the release in
 your
  respective environments and provide feedback (through the users list
 or
  Trac tickets).
  
  This is the second of four planned beta releases and if all goes well
 a
  final release should occur around the end of April. The full release
  plan which also includes the list of new features and changes in this
  release is available at:
  
 http://mapserver.org/trunk/development/release/release-plan-6.0.html
  
  The list of fixes since beta1 is attached at the end of this message.
  For a complete list see the HISTORY.TXT file at:
  
  
  
 
 
 http://trac.osgeo.org/mapserver/browser/tags/rel-6-0-0-beta2/mapserver/HISTORY.TXT
  
  We have started working on a 5.6 - 6.0 migration guide. This document
  contains important notes on backwards incompatibilities or other
 changes
  required when upgrading to 6.0. It is not complete yet but we strongly
  recommend that you review the latest version online at:
  
   http://mapserver.org/trunk/MIGRATION_GUIDE.html
  
  The source for this release can be downloaded at:
  
   http://mapserver.org/download.html
  or
   http://download.osgeo.org/mapserver/mapserver-6.0.0-beta2.tar.gz
  
  The binary distributions listed in the download page should be updated
  with binaries for the new beta release in the next day or so.
  
  Once again we need your help to ensure a high quality product, so
 please
  help out by testing your applications with this new code base.
  
  Thanks! - The MapServer Team
  
  
  Version 6.0.0-beta2 (2011-03-18)
  
  
  - correct scaling of symbol GAP and PATTERN (#3752)
  
  - remove references to SWF/MING
  
  - CGI runtime substitution requires a validation pattern (was optional
 before) (#3522)
  
  - add a default png8 outputformat that uses AGG/PNG with quantization
  
  - change MS_INIT_COLOR to take alpha as a parameter
  
  - stop using style-opacity in rendering code, use alpha from
 colorObjs.
  
  - Fixed big Oracle memory leak when rendering in KML (#3719)
  
  - avoid linking in postgres dependencies unnecessarily (#3708)
  
  - don't initialize outputformats until they are selected
  
  - use seamless creation of tiles for polygon fills with vector
 symbols
  
  - Ability to escape single/double quotes inside a string (#3706)
  
  - Globally replace msCaseFindSubstring with strcasestr (#3255)
  
  - support GROUP layers in shp2img (#3746)
  
  - Honour MAXSIZE for WCS 2.0 responses (#3204).
  
  - fallback to ows_title for WCS ows:Title

Re: [mapserver-users] Status of Java MapScript?

2011-02-24 Thread Umberto Nicoletti
On Thu, Feb 24, 2011 at 10:57 AM, Stephan Holl
stephan.h...@intevation.dewrote:

 Hello Umberto,

 Stephan Holl stephan.h...@intevation.de, [20110223 - 14:09:04]

  Hello Umberto,
 
  Umberto Nicoletti umberto.nicole...@gmail.com, [20110222 - 20:22:59]
 
   Hi Stephan,
   I'm the mantainer of java mapscript and while I have not been
   working on it for quite some time, I am stil successfully using it
   in a couple of projects (one is a fairly complex webgis).
 
  OK, thanks for your input. It seems I have to play a little bit with
  it and see how I can live with that.

 I am pariculary intersting in saving a mapfile with the save()-method.
 How is the status with this? Are there any mapfile-keywords accessable
 (and writeable) to a mapfile using mapscript? Are there known
 limitations?


Sorry, can't help you, that is a specific area that I have never used.

Umberto


 TIA

Stephan

 
   On Tue, Feb 22, 2011 at 9:51 AM, Stephan Holl
   stephan.h...@intevation.dewrote:
  
Hello list,
   
is anybody able to share the current status of Java Mapscript?
Browsing the net mostly brings up PHP mapscript, C# or python
mapscript status.
   
I would love to hear some user-feedback from happy (and of course
unhappy) Java mapscript-users. :-)
   
TIA
   
   Stephan
   
--
Stephan Holl stephan.h...@intevation.de | Tel.: +49 (0)541-33
508 3663 Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG
Osnabrück - HR B 18998 Geschäftsführer:  Frank Koormann, Bernhard
Reiter, Dr. Jan-Oliver Wagner
   
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
   
   
 
 


 Viele Grüße

Stephan

 --
 Stephan Holl stephan.h...@intevation.de | Tel.: +49 (0)541-33 508 3663
 Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG Osnabrück - HR B 18998
 Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

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


Re: [mapserver-users] Status of Java MapScript?

2011-02-22 Thread Umberto Nicoletti
Hi Stephan,
I'm the mantainer of java mapscript and while I have not been working on it
for quite some time, I am stil successfully using it in a couple of projects
(one is a fairly complex webgis).

Best regards,
Umberto

On Tue, Feb 22, 2011 at 9:51 AM, Stephan Holl stephan.h...@intevation.dewrote:

 Hello list,

 is anybody able to share the current status of Java Mapscript? Browsing
 the net mostly brings up PHP mapscript, C# or python mapscript status.

 I would love to hear some user-feedback from happy (and of course
 unhappy) Java mapscript-users. :-)

 TIA

Stephan

 --
 Stephan Holl stephan.h...@intevation.de | Tel.: +49 (0)541-33 508 3663
 Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG Osnabrück - HR B 18998
 Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

 ___
 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 crashes with large number of layers

2010-12-08 Thread Umberto Nicoletti
On Wed, Dec 8, 2010 at 3:58 PM, Oliver Wesp oliver.w...@gmail.com wrote:
 Dear List,

 we're kind of stuck with the following problem:

 First of all we are running Mapserver 5.6.5 in CGI Mode on Windows
 2003 Server (64bit). Webserver is Apache 2.2.

 We have a large Mapfile (seperated into 5 different parts using
 INCLUDE) with a total of 571 Layers. The layers have different
 MAXSCALEDENOM values  so not all of them are drawn at all scales. The
 layers are referencing the DATA via TILEINDEX (it's S-57 data read
 through OGR). Most of the layers cover only a small area, so if I zoom
 in to the map more and more layers must be taken into account of
 drawing but only a small number must be drawn. All of the layers are
 divided into three groups using the GROUP parameter.
 What happens if I zoom in to the map at some point mapserver crashes
 (actually it's not crashing it just stucks). If I reduce the total
 number of layers (by commenting out parts of the mapfile) the map will
 be drawn again. So my guess is that there is a problem with the number
 of layers (or styles?, or symbols?, or number of layers per group?)
 included.
 I turned on debugging on all of my layers but that didn't helped. If I
 check the taskmanager mapserver.exe goes to 100% cpu usage and goes
 back to zero after a few seconds but it's not being terminated. It's
 still running in the process list. Debug output stops right in the
 middle of the line. No error message is send to the client or written
 to any of the logfiles. Actually no response is send to the client at

Looks like a deadlock to me.
If you have msvc on the machine try to attach the debugger to the
process and see where it's stuck by requesting a stacktrace for
example. If msvc is not available I'd try ProcessMonitor from
sysinternals and last but not least good ole gdb (yes it does run on
Windows).

Recompile mapserver with debugging symbols to get accurate function
names and line numbers from the debugger.

Last step: verify that the mapserv process ran by apache is not
loading different dlls from the command line you used to test it.

HTH,
Umberto


 all. If I terminate the process using the task manager Premature end
 of script headers: mapserv.exe is written to the apache error.log and
 the client shows Internal Server Error.

 Right know we have no idea of what to look at. If anybody has any hint
 what might goes wrong we maybe would be able to look at it and maybe
 fix it. But right now we're stuck.

 Best regards,
 Oliver
 ___
 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] Need help tracking down mapserv seg fault

2010-08-17 Thread Umberto Nicoletti
It could be a problem with selinux/apparmor, try to disable it.
Best regards,
Umberto

On Fri, Aug 13, 2010 at 3:49 PM, Johan Forsman johan.fors...@la.gov wrote:
 Hello All:

 Please pardon the very lengthy post. I have attempted to collect as much data 
 as I could think of.

 Summary:
 FGS95 with MapServer 5.4.1 on Ubuntu Server, using OGR JOIN results in 
 mapserv seg fault when run from browser, works fine from shp2img.

 Detailed:
 I have an FGs95 install on Ubuntu Server 9.10, using MapServer 5.4.1 on the 
 back with a mixed shapefile/PostGIS datastore, GeoMoose 2.2 front-end. 
 Everything is working very nicely except for my current problem.

 I have a need to color polygons stored in a shapefile, CLASSified based on 
 attributes in an external csv-file. Guidance found in the ether indicates 
 that the only way to do this with MapServer is to use an OGR connection 
 between the shapefile and the csv-file.
 Using tips found here and there I have been able to construct a SELECT 
 statement in the DATA directive that allows shp2img to create a PNG that 
 looks just like I hoped it would (see attached), but I must confess that I 
 don't fully understand how as the SELECT statement does not look like what I 
 am used to seeing in some proprietary products. I am clearly in need of an 
 OGR education (with lots of example code).

 The LAYER section in the mapfile is

 LAYER # Parish Boundary Polygon Outline Layer
  NAME 'parishes_on_boiladv'
  CONNECTIONTYPE OGR
  CONNECTION webmaps_parishes.shp
  DATA SELECT * FROM webmaps_parishes LEFT JOIN 'bwa.csv'.bwa ON 
 webmaps_parishes.FIPS = bwa.FIPS
  STATUS default
  TYPE polygon
  CLASSITEM PercentageOut
  CLASS
    EXPRESSION ([PercentageOut]  0 AND [PercentageOut] = 10)
    NAME 0 - 10%
    STYLE
      COLOR 56 168 0
    END
  END #class
 (continues with several more classes).

 The shapefile and csv-file are stored in the same directory. Both have a 
 field FIPS which is the field I wish to join on. The PercentageOut field 
 is in the csv-file. The DATA statement appears to work, but I looks really 
 odd to me.

 Is there a way to get a table output from the OGR JOIN to study?

 I have set DEBUG 5 at the MAP level and the LAYER level to troubleshoot, but 
 the process segfaults before any error is written to the ms_error file. The 
 Apache and system logs contain only this when testing from localhost:

 /opt/fgs/www/logs/error_log:
 [Thu Aug 12 14:53:02 2010] [error] [client 127.0.1.1] Premature end of script 
 headers: mapserv

 /var/log/messages:
 Aug 12 14:53:02 geoview kernel: [12879514.857356] mapserv[24114]: segfault at 
 0 ip 0945e714 sp bf9058dc error 6

 I saw another post with similar issues suggesting it's a library issue, 
 discussing the LD_LIBRARY_PATH environment variable not being set properly 
 for the Apache user. As far as I can tell this variable points to the right 
 place in /opt/fgs/, but to be certain I added a SetEnv/PassEnv statement in 
 the fgs-version of httpd.conf without any change in behavior.

 In both /opt/fgs/etc/conf/httpd.conf and the local user environment I have
 LD_LIBRARY_PATH set to /opt/fgs/lib:/opt/fgs/www/lib.

 Is there a way to see the environment for the Apache user? I don't know how 
 important this is. As mentioned everything else has been and is working very 
 well.

 Could there be some other conflicting system library picked up?

 The URL I test with is
 /cgi-bin/mapserv?map=/opt/fgs/apps/geomoose2/maps/sdwp/boil_adv/webmaps_boil_advisories.mapmode=map
 and I have confirmed all works fine when pointing the URL to other mapfiles.

 I set the file and directory permissions to full access to all users 
 temporarily to test and there is no difference in behavior.

 When I run shp2img on the same mapfile the correct image is returned and 
 there are no errors indicated in the ms_error file. The only oddity I see is 
 in the path used by OGROpen:
  msLoadMap(): 0.033s
  msOGRFileOpen(webmaps_parishes.shp)...
  OGROPen(/opt/fgs/apps/geomoose2/maps/sdwp/boil_adv/./webmaps_parishes.shp)
  msConnPoolRegister(parishes_on_boiladv,webmaps_parishes.shp,0x9fdeb68)
  msOGRFileWhichShapes: Setting spatial filter to -10515009.640986 
 3370567.00 -9840476.359014 3918467.00
  msOGRFileNextShape: Returning shape=0, tile=0
 *** 62 shapes snipped here, there are 64 total polygons ***
  msOGRFileNextShape: Returning shape=63, tile=0
  msOGRFileNextShape: Returning MS_DONE (no more shapes)
  msOGRLayerClose(webmaps_parishes.shp).
  msOGRFileClose(/opt/fgs/apps/geomoose2/maps/sdwp/boil_adv/./webmaps_parishes.shp,-1).
  msConnPoolRelease(parishes_on_boiladv,webmaps_parishes.shp,0x9fdeb68)
  msConnPoolClose(webmaps_parishes.shp,0x9fdeb68)
  msDrawMap(): Layer 0 (parishes_on_boiladv), 0.118s
  msDrawMap(): Drawing Label Cache, 0.000s
  msDrawMap() total time: 0.126s
  msSaveImage() total time: 0.311s
  msFreeMap(): freeing map at 0x9d36ac8.
  freeLayer(): freeing layer at 0x9d3d7d8.
  shp2img total time: 0.472s

 What else 

Re: [mapserver-users] Java MapScript and Tomcat6 Hanging

2010-07-26 Thread Umberto Nicoletti
I'm totally clueless as to why it happens. As for the what happens a
trace of the java process with
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx Procmon
should give us a hint.

Regards,
Umberto


On Thu, Jul 22, 2010 at 4:34 PM, Gilbertson, Paul pau...@ceh.ac.uk wrote:
 I've left it to run for 5 minutes, still no response. Usual response time ~2s 
 and lower. No processor, no drive activity, just hangs.

 Regards,
 Paul Gilbertson


 -Original Message-
 From: Umberto Nicoletti [mailto:umberto.nicole...@gmail.com]
 Sent: 22 July 2010 15:16
 To: Gilbertson, Paul
 Subject: Re: [mapserver-users] Java MapScript and Tomcat6 Hanging

 That's pretty weird...will Tomcat respond eventually or does it stay
 locked forever? Is cpu or disk usage high while stalled?

 On Thu, Jul 22, 2010 at 4:07 PM, Gilbertson, Paul pau...@ceh.ac.uk
 wrote:
  Umberto,
 
  Absolute lock up. Process is running, but never responds to requests.
 Tomcat creates threads for new requests, and accepts them, they just
 never return data. Tomcat/JVM never crashes.
 
  The synchronized keyword was an attempt to fix this, symptoms are the
 same with or without it.
 
  Regards,
  Paul Gilbertson
 
 
  -Original Message-
  From: Umberto Nicoletti [mailto:umberto.nicole...@gmail.com]
  Sent: 22 July 2010 15:04
  To: Gilbertson, Paul
  Cc: mapserver-users@lists.osgeo.org
  Subject: Re: [mapserver-users] Java MapScript and Tomcat6 Hanging
 
  Hi Paul,
  please define hang: is it a crash or simply a momentary stall?
 
  In the case it is the latter I see the synchronized keyword in the
  definition of the doLogic method and by looking at the code you have
  posted it seems superflous, but there might be some other code that
  you didn't post that makes it necessary. Anyway I would start
 looking
  there.
 
  HTH,
  Umberto
 
  On Wed, Jul 21, 2010 at 4:41 PM, Gilbertson, Paul pau...@ceh.ac.uk
  wrote:
   Good folks,
  
   I am somewhat new to MapServer and MapScript, and I'm trying to do
 a
  few experiments with Java Mapscript in order to scope out
 MapServer's
  feasibility for a large project.
  
   I've downloaded and installed MS4W 3.0 beta 11, and Netbeans 6.9
 with
  Tomcat 6.0.29 in order to test out Java Mapscript. I created a most
  basic servlet to serve up simple map tiles, and it works for serial
  requests. When I try to serve two requests at the same time Tomcat
  hangs hard.
  
   My map file and Java classes are below:
  
   MAP
    IMAGETYPE      PNG24
    NAME           nbndemo
    STATUS         ON
    EXTENT         -12.5 12.5 70 1300012.5
    SIZE           800 800
    IMAGECOLOR     226 245 255
    CONFIG         MS_ERRORFILE /ms4w/apps/nbndemo/error.txt
    DEBUG          5
  
    PROJECTION
      init=epsg:27700
    END
  
    LAYER
      NAME         os250k
      STATUS       ON
      TILEINDEX    /OSRasterTiles/os_250k/os250k_tindex_srs.shp
      TILEITEM     Location
      TYPE         RASTER
      OFFSITE      71 74 65
  
      PROJECTION
        init=epsg:27700
      END
      EXTENT         -12.5 12.5 70 1300012.5
    END
   END
  
   public class SPRewriter {
      public synchronized void doLogic(HttpServletRequest request,
  HttpServletResponse response) throws Exception
      {
          ServletOutputStream out = response.getOutputStream();
          edu.umn.gis.mapscript.mapObj mo = new
  mapObj(/ms4w/apps/nbndemo/mapfiles/test.map);
  
          imageObj image = mo.draw();
          response.setContentType(image.getFormat().getMimetype());
          out.write(image.getBytes());
          image.delete();
          mo.delete();
      }
   }
  
      protected void processRequest(HttpServletRequest request,
  HttpServletResponse response) throws ServletException, IOException {
          try {
              SPRewriter spr = new SPRewriter();
              spr.doLogic(request, response);
          }  catch (Exception e) {
              e.printStackTrace();
          }
      }
  
   Any thoughts why this would hang the moment I try to run parallel
  requests?
  
   Regards,
   Paul Gilbertson
  
  
  
   --
   This message (and any attachments) is for the recipient only. NERC
   is subject to the Freedom of Information Act 2000 and the contents
   of this email and any reply you make may be disclosed by NERC
 unless
   it is exempt from release under the Act. Any material supplied to
   NERC may be stored in an electronic records management system.
  
   ___
   mapserver-users mailing list
   mapserver-users@lists.osgeo.org
   http://lists.osgeo.org/mailman/listinfo/mapserver-users
  
 
  --
  This message (and any attachments) is for the recipient only. NERC
  is subject to the Freedom of Information Act 2000 and the contents
  of this email and any reply you make may be disclosed by NERC unless
  it is exempt from release under the Act. Any material supplied to
  NERC may be stored in an electronic records management system

Re: [mapserver-users] Java mapscript on Linux

2009-07-15 Thread Umberto Nicoletti
Hi,
I am afraid you have to compile java mapscript from the sources.

Good luck,
Umberto

On Wed, Jul 15, 2009 at 7:24 PM, Ganaël Jatteaug...@galigeo.com wrote:
 Hello,



 I’m trying to deploy on Linux (Ubuntu 8.04) a Java application that uses
 mapscript.



 And I can’t find any libmapscript.so for Java (Ubuntu has some packages for
 Perl, Python PhP but not Java). Is there any other choice than getting the
 source code and compile it?



 (I believe that mapscript for PhP5 won’t contain the correct JNI headers to
 be used by mapscript.jar)



 Thanks in advance!

 ___
 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] Major MapServer Performance Problem on SunSolaris 10 64bit

2009-06-12 Thread Umberto Nicoletti
I am not a Solaris expert, but if you are running mapserver as a CGI,
Linux will almost surely be faster because of its (notoriously?) lower
process creation cost.
Now I don't have actual numbers to back this argument but a quick
google reveals this thread on Sun forums:

http://forums.sun.com/thread.jspa?threadID=5207554tstart=3344

http://archives.postgresql.org/pgsql-hackers-win32/2003-11/msg00044.php
(third para).

A solution would be using mapserver as a FastCGI.

HTH,
Umberto


On Fri, Jun 12, 2009 at 6:28 PM, Nolte,
Timtim.no...@ipcswirelessinc.com wrote:
 John,

 I am very glad that you have brought this up. We are currently running
 our MapServer on Solaris 10 x86 and I believe we are running it as 32bit
 but I can't actually say for sure, I just used standard compile
 instructions. We're running on two 3GHz Xeons. I have had many
 complaints concerning the performance of the server and haven't even
 considered that MapServer might be the culprit. We have both shapefile
 and Oracle Spatial data sources. We've always had the server running
 under Solaris 10 x86 so haven't even compared it to running under a
 different OS. I am very interested to hear any feedback on this subject
 as I may have to look at moving to Linux as my OS to get the performance
 gains I need.

 - Tim

 
 Timothy J Nolte - tno...@ilpcs.com
 Network Planning Engineer

 iPCS Wireless, Inc.
 4717 Broadmoor Ave, Suite G
 Kentwood, MI 49512

 Office: 616-656-5163
 PCS:    616-706-2438
 Fax:    616-554-6484
 Web: www.ipcswirelessinc.com

 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of John
 Westwood
 Sent: Friday, June 12, 2009 11:51 AM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] Major MapServer Performance Problem on
 SunSolaris 10 64bit

 Hi,

 We have been developing an application with MapServer as the backend. We
 developed it on an SLES Linux box, we are now setting it up on the Sun
 Solaris 10 production server. Unfortunately, the performance of
 MapServer on the production machine is very slow, considerably slower
 than the Linux development machine (which is much less powerful). The
 performance problem is particularly pronounced when serving vector
 PostGIS layers (OpenStreetMap), but it is also noticeably slow when
 serving rasters.

 We have tested PostGIS, this is fast and therefore no the problem. I
 have looked at the MapServer debug file at debug level 5 and this does
 not reveal much, except that both the total msDrawMap() time and the
 mapserv request processing time are slow. So, MapServer seems to be slow
 across the board. The Apache log file also confirms that the MapServer
 requests are slow.

 Originally, we had MapServer compiled as 64bit and Apache as 32bit, we
 thought that maybe this could be the problem. So, we compiled Apache for
 64bit - but has not made any difference. We are considering using 32bit
 Apache and 32bit MapServer but we are not sure if it will fix the
 problem.

 Does anybody have any ideas on what the problem could be or how we could
 go about diagnosing it? We would greatly appreciate any advice.

 Regards,

 John Westwood
 Great Britain Historical GIS Project
 ___
 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] problem with zoomRectangle

2009-05-04 Thread Umberto Nicoletti
I use this code to build the zoomRectangle (note the 1 which allows
for  miny = maxy):

return new rectObj(
(getXAsDouble()  getX2AsDouble() ) ? getXAsDouble() :
getX2AsDouble(),
(getYAsDouble()  getY2AsDouble() ) ? getY2AsDouble()
: getYAsDouble(),
(getXAsDouble()  getX2AsDouble() ) ? getX2AsDouble()
: getXAsDouble(),
(getYAsDouble()  getY2AsDouble() ) ? getYAsDouble() :
getY2AsDouble(),
1 // image coordinates, allow for miny = maxy
);

where X,Y and X2,Y2 are class attributes.

HTH,
Umberto

On Mon, May 4, 2009 at 11:32 AM, orkun te...@deprem.gov.tr wrote:
 hello

 I am working on java-mapscript

 I have a problem with zoomRectangle:

 here it is

 rect_left: 377.000
 rect_top: 120.000
 rect_width: 52
 rect_height: 36

 rectObj rect_img=new rectObj(rect_left,500-(rect_top+rect_height),
 rect_left+rect_width,500-rect_top,0)  ; // 500 map dimensions

 rect_img.toString() { 'minx': 377 , 'miny': 344 , 'maxx': 429 ,
 'maxy':380 }  // for checking it looks ok

 map0.zoomRectangle(rect_img,500,500,map0.getExtent(),null);

 it gives:

 Caused by: java.lang.UnknownError: mapscript::mapObj::zoomRectangle():
 General error message. image rectangle maxy = miny

 when I change the places of miny and maxy . it does not work again

 what is the wrong I am doing ?

 regards
 --
 Ahmet Temiz
 Jeo. Müh.
 Afet İşleri Gen. Md.lüğü
 Deprem Ar. D.

 Ahmet Temiz
 Geo. Eng.
 General Dir. of
 Disaster Affairs
 TURKEY


 --
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.

 ___
 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] Ruby Mapscript on Windows

2009-01-30 Thread Umberto Nicoletti
Peter,
I have built the ruby bindings on linux lately, but never on Windows.
Have you tried asking on the ms4w mailing list?

Best regards,
Umberto

On Fri, Jan 30, 2009 at 7:47 AM,  hazzar...@fastmail.fm wrote:
 Does anybody have any advice on how to get Ruby Mapscript working on
 Windows (2003), or does anybody have any pre-compiled Windows Ruby
 bindings? I'm a bit stuck finding a working version. The MS4W package
 comes with C#, Java, PHP and Python bindings, but no Ruby, and I haven't
 been able to find any online. I've tried compiling my own copy of
 Mapserver using the Visual Studio .NET 2003 and the buildkit available
 at http://www.gatewaygeomatics.com/dl/buildkit/, and while I can manage
 a working copy of mapserv.exe I haven't been able to compile the Ruby
 bindings. I'm able to run 'ruby extconf.rb' and generate a makefile, but
 running 'nmake' gets me some function redefinition errors (for strnicmp
 and stricmp between string.h and mapserver.h).

 If anybody's either had any experience generating the Ruby bindings on
 Windows or has a precompiled set of files, any help would be
 appreciated. I can supply more detailed information about the
 environment or the errors if it'll help.

 Thanks,

 Peter
 --

  hazzar...@fastmail.fm

 --
 http://www.fastmail.fm - I mean, what is it about a decent email service?

 ___
 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] php mapscript objects in session?

2008-11-21 Thread Umberto Nicoletti
And even if it was possible it is NOT recommended to reuse mapscript
objects across requests, see my previous post on the Mapserver Thread
Safety thread earlier this week.

Umberto

On Fri, Nov 21, 2008 at 10:13 AM, Pietro Giannini [EMAIL PROTECTED] wrote:
 according to my little knowledge, php cannot store an instance of an
 object in a session, only primitives variables like strings, integers,
 floats and arrays (asp.net instead can).

 for your app you must save the context (mapfile path, the extent, the
 layers status etc.), and re-instance the map object at each postback.

 hth

 pg



 --
 Pietro Giannini
 Bytewise srl - Area GIS
 41°50'38.58N 12°29'13.39E



 On Ven, Novembre 21, 2008 00:33, Christopher Condit wrote:
 Hi-
 I'm using ms4w 2.2.7 and I've run into a problem. Ideally I'd like to
 create the MapScript map object and store it in the session:

 $_SESSION['map'] = ms_newMapObj($getMapPath);

 This works fine for the that page, for the first call, but when I
 attempt to reference it later I get a PHP error:
 Fatal error: Object has an invalid _handle_ property

 Am I missing something here?

 Thanks,
 -Chris

 ___
 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] php mapscript objects in session?

2008-11-21 Thread Umberto Nicoletti
On Fri, Nov 21, 2008 at 11:55 AM, Pietro Giannini [EMAIL PROTECTED] wrote:
 Ciao Umberto,

 excuse me, but your statement has put me in a state of anxiety :)

 Currently I'm involved in an ASP.NET C# mapscript developement, and I use
 extensively the method of saving mapscript object in session.
 Naturally I tested the envirenmnet with a certain number of concurrent
 users, and I don't get any strange issue, like accessing to an object of
 another session.

so, do you share objects (like a mapobj) between sessions (ie:
different requests use the same mapObj instance to perform map
drawing) without locking at application (c# in your case) level?
If the answer is yes you've just been lucky so far as this approach
will surely lead to errors.


 Why do you say this is NOT recommended?


I'm sorry, I can't provide technical arguments right now, but in my
experience (+3years with Java mapscript) this solution proved to be
the most stable.
YMMV.

Ciao,
Umberto

 ciao ...pg

 --
 Pietro Giannini
 Bytewise srl - Area GIS
 41°50'38.58N 12°29'13.39E


 On Ven, Novembre 21, 2008 10:20, Umberto Nicoletti wrote:
 And even if it was possible it is NOT recommended to reuse mapscript
 objects across requests, see my previous post on the Mapserver Thread
 Safety thread earlier this week.

 Umberto

 On Fri, Nov 21, 2008 at 10:13 AM, Pietro Giannini [EMAIL PROTECTED]
 wrote:
 according to my little knowledge, php cannot store an instance of an
 object in a session, only primitives variables like strings, integers,
 floats and arrays (asp.net instead can).

 for your app you must save the context (mapfile path, the extent, the
 layers status etc.), and re-instance the map object at each postback.

 hth

 pg



 --
 Pietro Giannini
 Bytewise srl - Area GIS
 41°50'38.58N 12°29'13.39E



 On Ven, Novembre 21, 2008 00:33, Christopher Condit wrote:
 Hi-
 I'm using ms4w 2.2.7 and I've run into a problem. Ideally I'd like to
 create the MapScript map object and store it in the session:

 $_SESSION['map'] = ms_newMapObj($getMapPath);

 This works fine for the that page, for the first call, but when I
 attempt to reference it later I get a PHP error:
 Fatal error: Object has an invalid _handle_ property

 Am I missing something here?

 Thanks,
 -Chris

 ___
 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 Thread Safety

2008-11-19 Thread Umberto Nicoletti
On Wed, Nov 19, 2008 at 3:10 PM, Nelson Soto [EMAIL PROTECTED] wrote:
 So I kind of feel stupid at the moment…

 I had one understanding of thread safety and now I think I have another

that is the effect of learning, congrats!


 My first understanding was that if multiple users were accessing a site
 programmed very basically (not with any type of multi-threading code) but
 simply the fact that multiple users were making requests that they could
 potentially bump into requests and not return the same result if only one
 user were making requests.

 Now, I think it means specifically programming for a multi-threaded
 application so that you are using multiple code paths asynchronously in a
 given request would not be recommended without placing code-locks for
 various features.

Depending on the platform you are using both statements can be true as
they are different cases of multi-threading.

In the case of mapserver the checklist is as follows:

If you are using mapserver as a CGI then thread safety is not an issue
for you because each request will be handled by a new process that
will die immedately after so basically there is no chance of 'bumping
into others' requests' as you call it.

Same if you're using python, because of a quirk in the python
interpreter called GIL (Global Interpreter Lock) which stops the whole
python interpreter when entering external code such as the C shared
library of mapcript.

If you are using fastcgi AND have compiled mapserver with thread
support also no need to worry, unless you use one of the unsafe
components listed in the thread safety FAQ on the mapserver web site.

If you are using Java/C#/PHP/Ruby AND have compiled mapserver with
thread support you don't have to worry that much actually because
mapserver will lock properly when entering the same thread-unsafe code
paths listed in the FAQ cited above.

So your question eventually boils down to: should I also place locks
in my C#/Java code?
In general I would say it is not (I don't in my java app) provided
that you don't share mapscript objects between requests: don't create
a mapObj at the beginning of the session and reuse it for all the
session. Create a new mapObj with every request instead.

HTH,
Umberto


 Can someone please clarify for me what the thread-safety is in regards to
 Mapserver and Mapscript C#, PHP and Java and perhaps clarify one thing; If I
 am programming without implementing multiple threads in code but plan to
 have multiple users accessing the site, will they bump into any requests?



 Sorry for the ignorance, and thank you..

 ___
 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] getting field names using mapscript

2008-11-06 Thread Umberto Nicoletti
Sorry don't know that :-(

On Thu, Nov 6, 2008 at 2:32 PM, Jochen Wagner [EMAIL PROTECTED]
wrote:
 thanks, works fine and fast for each layer:

 $layer-open();
 $myitems = $layer-getItems();

 foreach($myitems as $item) {
echo $item.br;
 }
 $layer-close();

 but how can I get the numer of records without a query?
 Jo


 2008/11/6 Umberto Nicoletti [EMAIL PROTECTED]:
 You can use the items array on the layer object to get the field names

 On Thu, Nov 6, 2008 at 12:10 PM, Jochen Wagner
 [EMAIL PROTECTED] wrote:
 Hi list,
 I would like to list from any layer ($ qlayer) only the field names of
 the attribute tables and the number of objects in the table.

 With this code it works already:

 //loading mapfile
 $map= ms_newMapObj($mapfilepath.'\
 demo.map');

 //set layer
 $layer = $map-getLayerByName($qlayer);

 //rectquery via mapextent
 @$datQuery = $layer-queryByRect($map-extent);

 //if query is successful
 if ($datQuery == MS_SUCCESS) {
  //number of objects
  $resnum = $layer-getNumResults();
  echo 'Anzahl: '.$resnum.'br';

  $layer-open();
  $result = $layer-getResult(0);
  $shpobj = $layer-getShape($result-tileindex,$result-shapeindex);

  //read attribute table
  $attr = $shpobj-values;
  foreach($attr as $name=$wert) {
 echo 'Feld: '.$name.'br';
  }
 }
 $shpobj-free();
 $layer-close();

 However, this method has the disadvantage using a layers with many
 records the script takes a very long time, I guess because I have a
 query about the whole issue run.
 Has someone an approach for me, getting
 1. the field names of the table and
 2. the number of objects in the table
 performantly using MapScript ?
 thanks
 Jo
 ___
 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 5.2.0 and QUERYMAP Hilite

2008-11-04 Thread Umberto Nicoletti
On Tue, Nov 4, 2008 at 9:05 AM, Stephan Holl [EMAIL PROTECTED] wrote:
 Hello Umberto,

 Umberto Nicoletti [EMAIL PROTECTED], [20081104 - 08:46:24]

 I was hit by the same bug:

 when you specify hilite you MUST have a style section for each of your
 classes. The fix is therefore to add a style section to ALL of your
 classes.

 You mean each of my classes of layers which are being queryable?

exactly.



 Failure to comply will cause the new agg code (I think the gd renderer
 is immune, but it needs to be checked) to dereference a null pointer.
 The problem also exists with cgi mapserver and is not only related to
 mapscript.

 Ah, I am using the gd-rendering though.

then I must correct my statement: also the gd driver is affected. The
bug was introduced when we (mostly I, for those who like finger
pointing ;-) ) rewrote the layers, classes, styles arrays to be arrays
of pointers.

I'll file an issue on bugzilla later today.


 Ugh, thank your for your hint. I was not aware of that. Did I overlook
 this issue in the migration-guide?

Nope, I think we (the developers) were not aware of this problem until
now so it was probably not documented there.

Umberto


 Stephan


 On Mon, Nov 3, 2008 at 3:20 PM, Stephan Holl
 [EMAIL PROTECTED] wrote:
  Dear mapserver-users,
 
  I am updating a mapserver 4.1.0.3 app to mapserver 5.2.0 and found
  the issue that the following mapfile-block produces a seg fault with
  php-mapscript.
 
  QUERYMAP
   COLOR 0 255 255
   STATUS on
   STYLE hilite
  END
 
  With mapserver 4.10.3 everything was fine. Is this a known issue?
  Setting it the querymap to something else than STYLE 'hilite'
  everything works normal.
 
  Did anybody run into this? I found a bug about another
  hilite-stuff[1], but also the 5.2-branch from SVN has this
  behaviour.
 
  Thanks for any comments on this.
 
  Best
 
 Stephan
 
  --
  Stephan Holl [EMAIL PROTECTED]  | Tel.: +49 (0)541-33 50
  8 32 Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG Osnabrück -
  HR B 18998 Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr.
  Jan-Oliver Wagner
 
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 


 --
 Stephan Holl [EMAIL PROTECTED]  | Tel.: +49 (0)541-33 50 8 32
 Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG Osnabrück - HR B 18998
 Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

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


Re: [mapserver-users] MS 5.2.0 and QUERYMAP Hilite

2008-11-04 Thread Umberto Nicoletti
issue created:

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


Re: [mapserver-users] MS 5.2.0 and QUERYMAP Hilite

2008-11-04 Thread Umberto Nicoletti
Stephan
I have created a patch that might solve this problem. It is attached
to the ticket:

http://trac.osgeo.org/mapserver/ticket/2803

could you try it and report if it works?

Thanks,
Umberto

On Tue, Nov 4, 2008 at 9:40 AM, Stephan Holl [EMAIL PROTECTED] wrote:
 Hello Umberto,

 Umberto Nicoletti [EMAIL PROTECTED], [20081104 - 09:10:26]

 On Tue, Nov 4, 2008 at 9:05 AM, Stephan Holl
 [EMAIL PROTECTED] wrote:
  Hello Umberto,
 
  Umberto Nicoletti [EMAIL PROTECTED], [20081104 -
  08:46:24]
 
  I was hit by the same bug:
 
  when you specify hilite you MUST have a style section for each of
  your classes. The fix is therefore to add a style section to ALL
  of your classes.
 
  You mean each of my classes of layers which are being queryable?

 exactly.

 uff, my mapfile is more than 1 lines long and has _many_ classes...

 But yes, testing with one layer and it worked.

  Failure to comply will cause the new agg code (I think the gd
  renderer is immune, but it needs to be checked) to dereference a
  null pointer. The problem also exists with cgi mapserver and is
  not only related to mapscript.
 
  Ah, I am using the gd-rendering though.

 then I must correct my statement: also the gd driver is affected. The
 bug was introduced when we (mostly I, for those who like finger
 pointing ;-) ) rewrote the layers, classes, styles arrays to be arrays
 of pointers.

 I'll file an issue on bugzilla later today.

 Please drop a note (and a URL) on this thread so we find it.

  Ugh, thank your for your hint. I was not aware of that. Did I
  overlook this issue in the migration-guide?

 Nope, I think we (the developers) were not aware of this problem until
 now so it was probably not documented there.

 Thank you for clarifying!

 Best regards

Stephan

  On Mon, Nov 3, 2008 at 3:20 PM, Stephan Holl
  [EMAIL PROTECTED] wrote:
   Dear mapserver-users,
  
   I am updating a mapserver 4.1.0.3 app to mapserver 5.2.0 and
   found the issue that the following mapfile-block produces a seg
   fault with php-mapscript.
  
   QUERYMAP
COLOR 0 255 255
STATUS on
STYLE hilite
   END
  
   With mapserver 4.10.3 everything was fine. Is this a known issue?
   Setting it the querymap to something else than STYLE 'hilite'
   everything works normal.
  
   Did anybody run into this? I found a bug about another
   hilite-stuff[1], but also the 5.2-branch from SVN has this
   behaviour.
  
   Thanks for any comments on this.
  
   Best
  
  Stephan
  
   --
   Stephan Holl [EMAIL PROTECTED]  | Tel.: +49 (0)541-33
   50 8 32 Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG
   Osnabrück - HR B 18998 Geschäftsführer:  Frank Koormann,
   Bernhard Reiter, Dr. Jan-Oliver Wagner
  
   ___
   mapserver-users mailing list
   mapserver-users@lists.osgeo.org
   http://lists.osgeo.org/mailman/listinfo/mapserver-users
  
  
 
 
  --
  Stephan Holl [EMAIL PROTECTED]  | Tel.: +49 (0)541-33 50
  8 32 Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG Osnabrück -
  HR B 18998 Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr.
  Jan-Oliver Wagner
 


 --
 Stephan Holl [EMAIL PROTECTED]  | Tel.: +49 (0)541-33 50 8 32
 Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG Osnabrück - HR B 18998
 Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

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


Re: [mapserver-users] mapmygis.c

2008-11-04 Thread Umberto Nicoletti
+1
it seems that the oldest bug matching mygis is from 2005, therefore I
doubt we have hardly any user for this component.

On Tue, Nov 4, 2008 at 9:24 PM, Paul Ramsey [EMAIL PROTECTED] wrote:
 Do you use the MyGIS feature of Mapserver?

  --with-mygis[=ARG]  Include MyGIS Support (ARG=yes/path to mysql_config)

 If you do, please speak up, because I am making a motion to the
 developers list that we remove this very old, obscure feature. This is
 not about MySQL Spatial support, which exists, and will continue to
 exist, via the OGR driver. It's about the old MyGIS feature, which
 predates MySQL Spatial, and stores geometry in MySQL blobs.

 Paul

 -- Forwarded message --
 From: Paul Ramsey [EMAIL PROTECTED]
 Subject: mapmygis.c
 To: mapserver-dev [EMAIL PROTECTED]

 I come not to praise mapmygis.c, but to bury it.

 - It has no maintainer.
 - It operates on a model of spatial in MySQL (features in blobs) that
 has been super-ceded by the official spatial implementation that has
 now been there for 5 years.
 - It confuses people into thinking that *it* is the real MySQL spatial
 support in Mapserver, when the real support is via OGR.
 - It is deeply ugly code, and now that the mappostgis.c code it was
 based on is retired, I can freely say that. The longer it is there,
 the more likely some unwitting soul will template something on it.
 (See mapmssql2008.c)

 I move that we re-move.

 +1 Paul!
 ___
 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] Problem with Python Mapscript / Projection (MS4W)

2008-11-04 Thread Umberto Nicoletti
make sure that the user running apache can read the /usr/share/proj/epsg file.
If permissions seem ok then it could be a problem with SELinux or
apparmor, depending on your platform.

Umberto

On Wed, Nov 5, 2008 at 6:12 AM, Christian Jauvin [EMAIL PROTECTED] wrote:
 Hi,

 I get a MapServerError: msProcessProjection(): Projection library
 error. Permission denied error while using Python/MapScript (MS4W
 2.3, MapServer 5), after having included a

 PROJECTION
   init=epsg:
 END

 directive in a mapfile layer. I guess that it has something to do with
 an Apache permission to execute a binary somewhere..

 This is I think the first time I can't find an answer to a MS problem
 simply by googling, so I try it here, in hope that someone will be
 able to help.

 Thank you in advance,

 Christian
 ___
 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 5.2.0 and QUERYMAP Hilite

2008-11-03 Thread Umberto Nicoletti
I was hit by the same bug:

when you specify hilite you MUST have a style section for each of your
classes. The fix is therefore to add a style section to ALL of your
classes.

Failure to comply will cause the new agg code (I think the gd renderer
is immune, but it needs to be checked) to dereference a null pointer.
The problem also exists with cgi mapserver and is not only related to
mapscript.

Umberto

On Mon, Nov 3, 2008 at 3:20 PM, Stephan Holl [EMAIL PROTECTED] wrote:
 Dear mapserver-users,

 I am updating a mapserver 4.1.0.3 app to mapserver 5.2.0 and found the
 issue that the following mapfile-block produces a seg fault with
 php-mapscript.

 QUERYMAP
  COLOR 0 255 255
  STATUS on
  STYLE hilite
 END

 With mapserver 4.10.3 everything was fine. Is this a known issue?
 Setting it the querymap to something else than STYLE 'hilite'
 everything works normal.

 Did anybody run into this? I found a bug about another hilite-stuff[1],
 but also the 5.2-branch from SVN has this behaviour.

 Thanks for any comments on this.

 Best

Stephan

 --
 Stephan Holl [EMAIL PROTECTED]  | Tel.: +49 (0)541-33 50 8 32
 Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG Osnabrück - HR B 18998
 Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

 ___
 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] java mapscript + postgis = query use pixel map's limits

2008-09-29 Thread Umberto Nicoletti
On Sun, Sep 28, 2008 at 11:45 AM, Ludovico Bianchini [EMAIL PROTECTED] wrote:
 - Windows Vista Home Premium
 - Postgres 8.1
 - jvm 1.6.0
 - jboss 4.0.3SP1, tomcat 5.5
 - struts2
 - ms4w 2.3.0 (mapscript.jar, mapscript.dll, all other dlls taken from this
 pack)
 - postgresql-8.2-505.jdbc4.jar

 The query created to extract postgis layer is of the type

 SELECT asbinary(force_collection(force_2d(posizionegeoref)),'NDR') from
 rilievi.impianti where posizionegeoref  setSRID('BOX3D(0 0,599
 399)'::BOX3D, find_srid('','rilievi.impianti','posizionegeoref') );

 The BOX3D filter is created using pixel map's limits...(  BOX3D(0 0,599 399)
  ) why this?

 I use setExtent() before draw(), all navigation operations work fine, why is
 the query build against the pixel
 dimensions of the resulting image and not against the real dimensions
 calculated for the rectangle?

do you call setExtent before querying and convert image units into map units?


 Perhaps I am missing some basic instructions, but I don't know what...

 Thanks in advance for any suggestions.
 Ludovico
 Chiacchiera con i tuoi amici in tempo reale!
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.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] python mapscript - creating vector symbols on the fly?

2008-09-25 Thread Umberto Nicoletti
David,
after a quick look it seems that the API is there, although I am not
entirely sure whether it is stable or tested.

in pseudocode:

symbol=new symbolObj()
//set attributes of symbol
map-symbolset.append(symbol)

Regards,
Umberto


On Wed, Sep 24, 2008 at 10:09 PM, Fawcett, David
[EMAIL PROTECTED] wrote:
 In Python mapscript, is it possible to construct a vector symbol, like a
 circle, without referencing a mapfile or a symbolset file?

 Essentially, build this in code:

 SYMBOL
  NAME 'circle'
  TYPE ELLIPSE
  POINTS 1 1 END
  FILLED TRUE
 END

 If so, a few lines of code would be greatly appreciated...

 David.
 ___
 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] java mapscript + postgis = jvm crashed

2008-09-24 Thread Umberto Nicoletti
On Tue, Sep 23, 2008 at 10:50 PM, Ludovico Bianchini [EMAIL PROTECTED] wrote:
 Umberto Nicoletti ha scritto:

 I am using postgis layers (on Linux, though) and it works fine.

 Do you share the same mapObj between threads (in application scope) or
 multiple requests (in session scope)?
 mapscript is safe only when a new mapObj is created for each request.
 What other kind of layers do you have in your map?

 Umberto


 On Mon, Sep 22, 2008 at 10:34 PM, Ludovico Bianchini [EMAIL PROTECTED]
 wrote:


 - Windows Vista Home Premium
 - Postgres 8.1
 - jvm 1.6.0
 - jboss 4.0.3SP1, tomcat 5.5
 - struts2
 - ms4w 2.2.3 (mapscript.jar, mapscript.dll, all other dlls taken from
 this pack)
 - postgresql-8.2-505.jdbc4.jar

 mapscript.jar is placed in
 C:\jboss-4.0.3SP1\server\default\deploy\jbossweb-tomcat55.sar

 When a layer with a postgis connection is turned on, the draw method
 crashes the jvm.

 Error file attached.

 Is there any solution to this problem?

 Postgis is listed in unsafe components, i have not understood if there
 is one way to make it work using thread syncronization.

 Thanks in advance for any help.

 Ludovico


 __
 Do You Yahoo!?
 Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da
 tanto spazio gratuito per i tuoi file e i messaggi
 http://mail.yahoo.it
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users







 I think I do not share the same object between request.

 The other layer are shape file layer, they work fine (zoom ok, pan ok).

 struts!-- Configuration for the default package. --
   package name=default extends=struts-default
.
.
.
   action name=Mappa* class=segnaletica.action.MappaAction
 method={1}
   result/jsp/mappa.jsp/result
.
.
.
   /action
   /package
 /struts

 public class MappaAction extends ActionSupport implements
 ServletRequestAware{

Are you sharing any mapscript object as an Action attribute? If yes
that's probably the culprit, otherwis it seems pretty strange...
Does the crash occur only when more than user is accessing the map or
even when there is only one user?

Also ms4w 2.2.3 seems prett old, why don't you upgrade to the latest?

Umberto

   .
   .//attributes
   .
   .
 public String execute() throws Exception {
 mapObj mapObj_o = new
 mapObj(C:\\jboss-4.0.3sp1_map\\map\\treviso.map);//create a new mapObj
 object
 if(OP == null) OP = -1;
 int op = Integer.parseInt(OP);
   switch (op) {
   case Z_IN: zoomIn(mapObj_o);
 break;
   case Z_OUT: zoomOut(mapObj_o);
 break;
   case PAN: pan(mapObj_o);
 break;
   case REFRESH: refresh(mapObj_o);
 break;

   default: fullExtent(mapObj_o);
   break;
   }
   return SUCCESS;
   }
   .
   .//utility methods, map navigation methods
   .

 private void draw(mapObj mapObj_o){
   .
   .
   mapImageObj = mapObj_o.draw();//this instruction crashes the JVM
   .
   .
   }

 }

 
 LAYER SEGNALETICA
 
 

   LAYER
   NAME segnaletica
   STATUS OFF
   TYPE POINT
   TRANSFORM false
   POSTLABELCACHE true
   CONNECTION user=user password=password dbname=dbname host=localhost
 port=5432
   CONNECTIONTYPE postgis
   DATA posizionegeoref from rilievi.impianti   CLASS
   STYLE
   COLOR 255 99 0
   SYMBOL circle
   SIZE 12
   END
   END
   PROJECTION
   init=epsg:4326
   END
   END

 Ludovico
 Chiacchiera con i tuoi amici in tempo reale!
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com

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


Re: [mapserver-users] java mapscript + postgis = jvm crashed

2008-09-23 Thread Umberto Nicoletti
I am using postgis layers (on Linux, though) and it works fine.

Do you share the same mapObj between threads (in application scope) or
multiple requests (in session scope)?
mapscript is safe only when a new mapObj is created for each request.
What other kind of layers do you have in your map?

Umberto


On Mon, Sep 22, 2008 at 10:34 PM, Ludovico Bianchini [EMAIL PROTECTED] wrote:
 - Windows Vista Home Premium
 - Postgres 8.1
 - jvm 1.6.0
 - jboss 4.0.3SP1, tomcat 5.5
 - struts2
 - ms4w 2.2.3 (mapscript.jar, mapscript.dll, all other dlls taken from this 
 pack)
 - postgresql-8.2-505.jdbc4.jar

 mapscript.jar is placed in 
 C:\jboss-4.0.3SP1\server\default\deploy\jbossweb-tomcat55.sar

 When a layer with a postgis connection is turned on, the draw method crashes 
 the jvm.

 Error file attached.

 Is there any solution to this problem?

 Postgis is listed in unsafe components, i have not understood if there is 
 one way to make it work using thread syncronization.

 Thanks in advance for any help.

 Ludovico


 __
 Do You Yahoo!?
 Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto 
 spazio gratuito per i tuoi file e i messaggi
 http://mail.yahoo.it
 ___
 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] Debian Oracle10g OCI

2008-09-16 Thread Umberto Nicoletti
Revert configure to the previous oraclespatial setting and try:

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

before configure.

Umberto


2008/9/16  [EMAIL PROTECTED]:
 Now I get:

 checking if OracleSpatial support requested... yes, user supplied
 ORACLE_HOME
 configure: error: Oracle Spatial: libclntsh.so not found.

 I enclose the config.log.

 --
 Michał


 2008/9/16 Umberto Nicoletti [EMAIL PROTECTED]

 try:

 -with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.2.0

 otherwise post the config.log file.

 Umberto

 2008/9/16  [EMAIL PROTECTED]:
  Thanks for the tip!
  The Makefile looks like:
   -- Compiler Info -
C compiler:gcc -O2 -fPIC -Wall
C++ compiler:  g++ -O2 -fPIC -Wall
Debug:
Generic NINT:
 
   -- Renderer Settings -
zlib support:  -DUSE_ZLIB
png support:
palette rgba png support:
jpeg support:
iconv support: -DUSE_ICONV
AGG support:
AGG Freetype support:
Ming(flash) support:
PDFLib support:
 
   -- Support Libraries -
Proj.4 support:-DUSE_PROJ
Libxml2 support:
FriBidi support:
Curl support:  -DUSE_CURL
FastCGI support:
Threading support: -DUSE_THREAD
GEOS support:
 
   -- Data Format Drivers ---
native tiff support:
PostGIS support:
EPPL7 support: -DUSE_EPPL
ArcSDE support:
OGR support:   -DUSE_OGR
GDAL support:  -DUSE_GDAL
Oracle Spatial support:-DUSE_ORACLESPATIAL
 
   -- OGC Services --
WMS Server:-DUSE_WMS_SVR
WMS Client:-DUSE_WMS_LYR
WFS Server:
WFS Client:-DUSE_WMS_LYR
WCS Server:
SOS Server:
 
   -- MapScript -
PHP MapScript: no
 
  the make command throws the following error:
 
   warning: libnnz10.so, needed by
  /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so,
  not
  found (try using -rpath or -rpath-link)
  /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
  undefined reference to `nztSearchNZDefault'
  /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
  undefined reference to `nzosCipherSpecToStr'
  /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
  undefined reference to `nztwOpenWallet'
  /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
  undefined reference to `A_X931RandomInit'
  
  ends with
  collect2: ld returned 1 exit status
  make: *** [shp2img] Error 1
 
  any ideas!
 
  --
  Michał
 
 
  2008/9/16 Umberto Nicoletti [EMAIL PROTECTED]
 
  Usign tiff AND gdal is not recommended, you'd better try these options:
 
  ./configure
  -with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
  -with-proj -with-wfsclient -with-wmsclient -with-gdal -with-ogr
  -with-threads -with-freetype  -without-tiff -with-FastCGI
 
  as for the expat error:
 
  sudo apt-get install libexpat1 libexpat1-dev
 
  Umberto
 
  2008/9/16  [EMAIL PROTECTED]:
   Hi again,
  
   I've tried to compile mapserv executable with:
  
   ./configure
  
   -with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
   -with-proj -with-wfsclient -with-wmsclient -with-gdal -with-ogr
   -with-threads -with-freetype  -with-tiff -with-FastCGI
  
   and I receive this error:
  
   /usr/bin/ld: cannot find -lexpat
   collect2: ld returned 1 exit status
   make: *** [shp2img] Error 1
  
   Does anyone know what is wrong?
  
   --
   Michał
  
  
   On Mon, Sep 15, 2008 at 3:16 PM, Dan Little [EMAIL PROTECTED]
   wrote:
  
   Umberto is right, for Mapserver to connect to Oracle you need to
   specify
   that capability at compile time.  But for you ge tthat far I think
   you
   need
   to make sure that some of the basics work.
  
   Also, if you cannot connect to Oracle via SQL*Plus (assuming the
   binary
   is
   installed) you have other problems including but not limited to:
   - needing to set the LD_LIBRARY_PATH to include all the libraries.
This
   may also need to be done in Apache while running mapserver to access
   Oracle.
   - needing to configure your TNSNAMES file.
   - check firewall setting in order to make sure you can connect on
   1521
   (or
   whatever port you are using for Oracle).
  
   Generally, when running an Oracle layer, you want to try the
   following
   diagnostic steps:
   1) Use SQL Developer to connect to the database (it has it's own
   drivers
   built in, so there's no software dependency issues).  This will
   resolve
   whether or not the databas is working.
   2) On the machine, try connecting with SQL Plus.  This will
   determine
   whether or not you have your client configured correctly.  Do not
   move
   on
   until this works.
   3) Try and re-compile

Re: [MAPSERVER-USERS] Debian Oracle10g OCI

2008-09-16 Thread Umberto Nicoletti
try:

-with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.2.0

otherwise post the config.log file.

Umberto

2008/9/16  [EMAIL PROTECTED]:
 Thanks for the tip!
 The Makefile looks like:
  -- Compiler Info -
   C compiler:gcc -O2 -fPIC -Wall
   C++ compiler:  g++ -O2 -fPIC -Wall
   Debug:
   Generic NINT:

  -- Renderer Settings -
   zlib support:  -DUSE_ZLIB
   png support:
   palette rgba png support:
   jpeg support:
   iconv support: -DUSE_ICONV
   AGG support:
   AGG Freetype support:
   Ming(flash) support:
   PDFLib support:

  -- Support Libraries -
   Proj.4 support:-DUSE_PROJ
   Libxml2 support:
   FriBidi support:
   Curl support:  -DUSE_CURL
   FastCGI support:
   Threading support: -DUSE_THREAD
   GEOS support:

  -- Data Format Drivers ---
   native tiff support:
   PostGIS support:
   EPPL7 support: -DUSE_EPPL
   ArcSDE support:
   OGR support:   -DUSE_OGR
   GDAL support:  -DUSE_GDAL
   Oracle Spatial support:-DUSE_ORACLESPATIAL

  -- OGC Services --
   WMS Server:-DUSE_WMS_SVR
   WMS Client:-DUSE_WMS_LYR
   WFS Server:
   WFS Client:-DUSE_WMS_LYR
   WCS Server:
   SOS Server:

  -- MapScript -
   PHP MapScript: no

 the make command throws the following error:

  warning: libnnz10.so, needed by
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so, not
 found (try using -rpath or -rpath-link)
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `nztSearchNZDefault'
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `nzosCipherSpecToStr'
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `nztwOpenWallet'
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `A_X931RandomInit'
 
 ends with
 collect2: ld returned 1 exit status
 make: *** [shp2img] Error 1

 any ideas!

 --
 Michał


 2008/9/16 Umberto Nicoletti [EMAIL PROTECTED]

 Usign tiff AND gdal is not recommended, you'd better try these options:

 ./configure
 -with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
 -with-proj -with-wfsclient -with-wmsclient -with-gdal -with-ogr
 -with-threads -with-freetype  -without-tiff -with-FastCGI

 as for the expat error:

 sudo apt-get install libexpat1 libexpat1-dev

 Umberto

 2008/9/16  [EMAIL PROTECTED]:
  Hi again,
 
  I've tried to compile mapserv executable with:
 
  ./configure
  -with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
  -with-proj -with-wfsclient -with-wmsclient -with-gdal -with-ogr
  -with-threads -with-freetype  -with-tiff -with-FastCGI
 
  and I receive this error:
 
  /usr/bin/ld: cannot find -lexpat
  collect2: ld returned 1 exit status
  make: *** [shp2img] Error 1
 
  Does anyone know what is wrong?
 
  --
  Michał
 
 
  On Mon, Sep 15, 2008 at 3:16 PM, Dan Little [EMAIL PROTECTED] wrote:
 
  Umberto is right, for Mapserver to connect to Oracle you need to
  specify
  that capability at compile time.  But for you ge tthat far I think you
  need
  to make sure that some of the basics work.
 
  Also, if you cannot connect to Oracle via SQL*Plus (assuming the binary
  is
  installed) you have other problems including but not limited to:
  - needing to set the LD_LIBRARY_PATH to include all the libraries.
   This
  may also need to be done in Apache while running mapserver to access
  Oracle.
  - needing to configure your TNSNAMES file.
  - check firewall setting in order to make sure you can connect on 1521
  (or
  whatever port you are using for Oracle).
 
  Generally, when running an Oracle layer, you want to try the following
  diagnostic steps:
  1) Use SQL Developer to connect to the database (it has it's own
  drivers
  built in, so there's no software dependency issues).  This will resolve
  whether or not the databas is working.
  2) On the machine, try connecting with SQL Plus.  This will determine
  whether or not you have your client configured correctly.  Do not move
  on
  until this works.
  3) Try and re-compile Mapserver with Oracle Spatial.  At the end of the
  ./configure script there is an output screen, ensure that you see
  Oracle is
  turned on, otherwise scroll up in the screen and see what's missing.
 
 
 
  - Original Message 
   From: Umberto Nicoletti [EMAIL PROTECTED]
   To: dzizes [EMAIL PROTECTED]
   Cc: mapserver-users@lists.osgeo.org
   Sent: Monday, September 15, 2008 7:45:48 AM
   Subject: Re: [MAPSERVER-USERS] Debian Oracle10g OCI
  
   You have to recompile mapserver with the:
  
   --with-oraclespatial=[path to oracle home]
  
   option. That's all that is needed to enable oracle

Re: [MAPSERVER-USERS] Debian Oracle10g OCI

2008-09-16 Thread Umberto Nicoletti
I'm at a complete loss here. I assume there is a problem with your
oracle install.
did you run /etc/init.d/oracle-xe configure?

Umberto

2008/9/16  [EMAIL PROTECTED]:
 Makefile generates without any problems, but when executing make command I
 receive:

 /usr/bin/ld: warning: libnnz10.so, needed by
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so, not
 found (try using -rpath or -rpath-link)
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `nztSearchNZDefault'
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `nzosCipherSpecToStr'
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `nztwOpenWallet'
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `A_X931RandomInit'
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `nzosgpc_GetProtocolVer'
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `nzos_DisableClientAuthentication'
 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
 undefined reference to `nzduui2_destroy_ui'


 
 ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
 LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 LOGNAME=root


 --
 Michał


 2008/9/16 Umberto Nicoletti [EMAIL PROTECTED]

 Revert configure to the previous oraclespatial setting and try:

 export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

 before configure.

 Umberto


 2008/9/16  [EMAIL PROTECTED]:
  Now I get:
 
  checking if OracleSpatial support requested... yes, user supplied
  ORACLE_HOME
  configure: error: Oracle Spatial: libclntsh.so not found.
 
  I enclose the config.log.
 
  --
  Michał
 
 
  2008/9/16 Umberto Nicoletti [EMAIL PROTECTED]
 
  try:
 
  -with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.2.0
 
  otherwise post the config.log file.
 
  Umberto
 
  2008/9/16  [EMAIL PROTECTED]:
   Thanks for the tip!
   The Makefile looks like:
-- Compiler Info -
 C compiler:gcc -O2 -fPIC -Wall
 C++ compiler:  g++ -O2 -fPIC -Wall
 Debug:
 Generic NINT:
  
-- Renderer Settings -
 zlib support:  -DUSE_ZLIB
 png support:
 palette rgba png support:
 jpeg support:
 iconv support: -DUSE_ICONV
 AGG support:
 AGG Freetype support:
 Ming(flash) support:
 PDFLib support:
  
-- Support Libraries -
 Proj.4 support:-DUSE_PROJ
 Libxml2 support:
 FriBidi support:
 Curl support:  -DUSE_CURL
 FastCGI support:
 Threading support: -DUSE_THREAD
 GEOS support:
  
-- Data Format Drivers ---
 native tiff support:
 PostGIS support:
 EPPL7 support: -DUSE_EPPL
 ArcSDE support:
 OGR support:   -DUSE_OGR
 GDAL support:  -DUSE_GDAL
 Oracle Spatial support:-DUSE_ORACLESPATIAL
  
-- OGC Services --
 WMS Server:-DUSE_WMS_SVR
 WMS Client:-DUSE_WMS_LYR
 WFS Server:
 WFS Client:-DUSE_WMS_LYR
 WCS Server:
 SOS Server:
  
-- MapScript -
 PHP MapScript: no
  
   the make command throws the following error:
  
warning: libnnz10.so, needed by
   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so,
   not
   found (try using -rpath or -rpath-link)
   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
   undefined reference to `nztSearchNZDefault'
   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
   undefined reference to `nzosCipherSpecToStr'
   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
   undefined reference to `nztwOpenWallet'
   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so:
   undefined reference to `A_X931RandomInit'
   
   ends with
   collect2: ld returned 1 exit status
   make: *** [shp2img] Error 1
  
   any ideas!
  
   --
   Michał
  
  
   2008/9/16 Umberto Nicoletti [EMAIL PROTECTED]
  
   Usign tiff AND gdal is not recommended, you'd better try these
   options:
  
   ./configure
  
   -with-oraclespatial=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
   -with-proj -with-wfsclient -with-wmsclient -with-gdal -with-ogr
   -with-threads -with-freetype  -without-tiff -with-FastCGI
  
   as for the expat error:
  
   sudo apt-get install libexpat1 libexpat1-dev
  
   Umberto
  
   2008/9/16  [EMAIL PROTECTED]:
Hi again,
   
I've tried to compile mapserv executable with:
   
./configure

Re: [mapserver-users] MapServer and Microsoft VirtualEarth

2008-09-12 Thread Umberto Nicoletti
Yes it is possible though not directly using mapserver, but using OpenLayers.

Umberto

On Fri, Sep 12, 2008 at 9:12 AM, Carlo Pelliconi [EMAIL PROTECTED] wrote:
 Hi all.
 Is it possible and, if yes, is there any documentation about visualization
 of GIS analysis, performed by MapServer, in VirtualEarth?
 Thank you very much.
 Regards, Carlo

 --
 ing. Carlo Pelliconi
 [EMAIL PROTECTED]



 ___
 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] Java mapscript: connection timeout

2008-09-01 Thread Umberto Nicoletti
Please post the exact error message and architecture you're running
(version of Windows, linux, etc)?

Umberto

On Mon, Sep 1, 2008 at 7:53 AM, Ishwari Sivagnanam [EMAIL PROTECTED] wrote:
 Hello all,
 I developed a mapserver site in Java mapscript and have run into a timeout
 issue. I have tried to explain the problem as best as I can below. I am new
 to web application development and mapserver so I apologize for errors in
 the description.

 I have two seperate mapserver pages in my website. The scripting is done
 using Java Mapscript and JSP pages. The backend data comes from a
 Postgresql/ PostGIS database. I developed the exact same application in PHP
 and 'deployed' it. I have had no issues with that site. The Java mapscript
 was developed along the same lines as the PHP application.
 Both mapserver pages share ~ 10 base maps. Additionally each of these pages
 has a set of thematic maps. Page 1 has 2 thematic maps of the same point
 layer and a third thematic layer with a summary statistic for a polygon
 layer. Page 2 has a single thematic map which displays a summary statistic
 of a polygon layer. Page 1 by itself works well. Page 2 by itself works
 well.
 The problem occurs when
 (a) page 1 and page 2 are merged or
 (b) if they are deployed parallely in the same site
 I get an message which says Connection timed out.
 I have tried searching the web for an answer but haven't been very
 successful

 Version and Specs:
 
 MapServer version 5.0.0
 PHP MapScript Version - ($Revision: 6872 $ $Date: 2007-09-10 10:45:30 -0400
 (Mon, 10 Sep 2007) $)
 PostgreSQL 8.2.3
 PostGIS 1.3.2

 Apache Tomcat 5.5
 Java 1.6
 Java mapscript - Downloaded and installed using the page in the
 mapserver.umn.. website

 Could somebody help me please?

 Ishwari


 ___
 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] Java mapscript: connection timeout

2008-09-01 Thread Umberto Nicoletti
Ok, now we're getting somewhere, but I need more information.
Read the fine manual (all of it, twice ;-)) at:

http://mapserver.gis.umn.edu/docs/howto/javamapscript

and report all the information it mentions in the last section.
In particular I need to know if you compiled java mapscript by
yourself or used the ms4w packages.
Also make sure you attach the hs_err*.log files.

Regards,
Umberto

On Mon, Sep 1, 2008 at 11:04 AM, Ishwari Sivagnanam [EMAIL PROTECTED] wrote:
 The error message is the standard Connection timeout or Unable to
 connect page that appears in Firefox and the 'page not available' (I
 couldn't attach a screen capture). The platform is windows XP.

  Ocassionally loading the application stops Tomcat completely.

 Should I send the error log ?

 Thanks,
 Ishwari





 On Mon, Sep 1, 2008 at 12:32 PM, Umberto Nicoletti
 [EMAIL PROTECTED] wrote:

 Please post the exact error message and architecture you're running
 (version of Windows, linux, etc)?

 Umberto

 On Mon, Sep 1, 2008 at 7:53 AM, Ishwari Sivagnanam [EMAIL PROTECTED]
 wrote:
  Hello all,
  I developed a mapserver site in Java mapscript and have run into a
  timeout
  issue. I have tried to explain the problem as best as I can below. I am
  new
  to web application development and mapserver so I apologize for errors
  in
  the description.
 
  I have two seperate mapserver pages in my website. The scripting is done
  using Java Mapscript and JSP pages. The backend data comes from a
  Postgresql/ PostGIS database. I developed the exact same application in
  PHP
  and 'deployed' it. I have had no issues with that site. The Java
  mapscript
  was developed along the same lines as the PHP application.
  Both mapserver pages share ~ 10 base maps. Additionally each of these
  pages
  has a set of thematic maps. Page 1 has 2 thematic maps of the same point
  layer and a third thematic layer with a summary statistic for a polygon
  layer. Page 2 has a single thematic map which displays a summary
  statistic
  of a polygon layer. Page 1 by itself works well. Page 2 by itself works
  well.
  The problem occurs when
  (a) page 1 and page 2 are merged or
  (b) if they are deployed parallely in the same site
  I get an message which says Connection timed out.
  I have tried searching the web for an answer but haven't been very
  successful
 
  Version and Specs:
  
  MapServer version 5.0.0
  PHP MapScript Version - ($Revision: 6872 $ $Date: 2007-09-10 10:45:30
  -0400
  (Mon, 10 Sep 2007) $)
  PostgreSQL 8.2.3
  PostGIS 1.3.2
 
  Apache Tomcat 5.5
  Java 1.6
  Java mapscript - Downloaded and installed using the page in the
  mapserver.umn.. website
 
  Could somebody help me please?
 
  Ishwari
 
 
  ___
  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] Java mapscript: connection timeout

2008-09-01 Thread Umberto Nicoletti
I would start by removing the ogr layers: move them to postgis or even
better to shapefiles using the ogr2ogr utility.
Try to have only shapefiles or postgis layers in your mapfiles and see
if that helps. Disabling the ogr component is not strictly necessary
(even thouh it is recommended) provided that you do not use it.

Regards,
Umberto

On Mon, Sep 1, 2008 at 1:28 PM, Ishwari Sivagnanam [EMAIL PROTECTED] wrote:
 Given below are the specs for what I have installed on my machine. I
 downloaded and installed the ms4w package with the windows installer. So I
 haven't done any builds. And I haven't removed any dlls.

 I added the ntwdblib.dll to the cgi-bin folder. I believe this is used to
 connect SQL server and PHP. The data was originally in SQL server before I
 moved it all to Postgres.

 OS: Windows XP
 gcc version : don't know what this is
 MapServer: version 5.0.0
 Java : JDK 1.6 (NetBeans IDE 5.5.1)
 Java mapscript - the .dll and .jar file that are part of the ms4w package
 Apache Tomcat 5.5

 Other:
 
 PHP MapScript Version - ($Revision: 6872 $ $Date: 2007-09-10 10:45:30 -0400
 (Mon, 10 Sep 2007) $)
 ogr: i use the ogr2ogr library to call MapInfo layers

 Database:
 --
 PostgreSQL 8.2.3
 PostGIS 1.3.2

 I read through the howto document that you pointed me to. I will check on
 the connection pooling.

 Unsafe components: I do use the ogr library since I have mapInfo files. I
 can move them to postgis. But I don't know how to disable the components.
 Since I didn't compile Java Mapscript I don't know how to fix this.

 Please find attached the most recent hs_err*.log from my machine.

 Thanks for your help
 :-)

 Ishwari

 On Mon, Sep 1, 2008 at 2:51 PM, Umberto Nicoletti
 [EMAIL PROTECTED] wrote:

 Ok, now we're getting somewhere, but I need more information.
 Read the fine manual (all of it, twice ;-)) at:

 http://mapserver.gis.umn.edu/docs/howto/javamapscript

 and report all the information it mentions in the last section.
 In particular I need to know if you compiled java mapscript by
 yourself or used the ms4w packages.
 Also make sure you attach the hs_err*.log files.

 Regards,
 Umberto

 On Mon, Sep 1, 2008 at 11:04 AM, Ishwari Sivagnanam [EMAIL PROTECTED]
 wrote:
  The error message is the standard Connection timeout or Unable to
  connect page that appears in Firefox and the 'page not available' (I
  couldn't attach a screen capture). The platform is windows XP.
 
   Ocassionally loading the application stops Tomcat completely.
 
  Should I send the error log ?
 
  Thanks,
  Ishwari
 
 
 
 
 
  On Mon, Sep 1, 2008 at 12:32 PM, Umberto Nicoletti
  [EMAIL PROTECTED] wrote:
 
  Please post the exact error message and architecture you're running
  (version of Windows, linux, etc)?
 
  Umberto
 
  On Mon, Sep 1, 2008 at 7:53 AM, Ishwari Sivagnanam
  [EMAIL PROTECTED]
  wrote:
   Hello all,
   I developed a mapserver site in Java mapscript and have run into a
   timeout
   issue. I have tried to explain the problem as best as I can below. I
   am
   new
   to web application development and mapserver so I apologize for
   errors
   in
   the description.
  
   I have two seperate mapserver pages in my website. The scripting is
   done
   using Java Mapscript and JSP pages. The backend data comes from a
   Postgresql/ PostGIS database. I developed the exact same application
   in
   PHP
   and 'deployed' it. I have had no issues with that site. The Java
   mapscript
   was developed along the same lines as the PHP application.
   Both mapserver pages share ~ 10 base maps. Additionally each of these
   pages
   has a set of thematic maps. Page 1 has 2 thematic maps of the same
   point
   layer and a third thematic layer with a summary statistic for a
   polygon
   layer. Page 2 has a single thematic map which displays a summary
   statistic
   of a polygon layer. Page 1 by itself works well. Page 2 by itself
   works
   well.
   The problem occurs when
   (a) page 1 and page 2 are merged or
   (b) if they are deployed parallely in the same site
   I get an message which says Connection timed out.
   I have tried searching the web for an answer but haven't been very
   successful
  
   Version and Specs:
   
   MapServer version 5.0.0
   PHP MapScript Version - ($Revision: 6872 $ $Date: 2007-09-10 10:45:30
   -0400
   (Mon, 10 Sep 2007) $)
   PostgreSQL 8.2.3
   PostGIS 1.3.2
  
   Apache Tomcat 5.5
   Java 1.6
   Java mapscript - Downloaded and installed using the page in the
   mapserver.umn.. website
  
   Could somebody help me please?
  
   Ishwari
  
  
   ___
   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] confused on java mapscript

2008-07-09 Thread Umberto Nicoletti
Orkun,
you will have to code the getResult method yourself depending on your
application requirements.
It was intentionally left out from the code snippet as a in a 'fill
the blanks' example. Sorry if it confused you.

Regards,
Umberto


On Wed, Jul 9, 2008 at 2:25 PM, orkun [EMAIL PROTECTED] wrote:
 hello

 I am confused on  java mapscript QueryByPoint example which
 resides in the mapserver official site Building and using Java
 Mapscript.


 which class do I have to import for this ?

 Map aResult = getResult(shape, layer); # gives incompatible types



 regards

 --
 Ahmet Temiz
 Jeo. Müh.
 Afet İşleri Gen. Md.lüğü
 Deprem Ar. D.

 Ahmet Temiz
 Geo. Eng.
 General Dir. of
 Disaster Affairs



 --
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.

 ___
 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