[mapserver-users] OFFSITE more values

2010-09-24 Thread Sven Schroeter

Hi,

I have a rasterlayer with more than 1000 .ecw airial photos and want to set 
more than one RGB-value transparent with OFFSITE.

This works fine:
OFFSITE 0 0 0

but I need something like this:
OFFSITE [0 0 0,1 1 1,1 2 1]

Is there a possibility to solve my problem?

Sven 



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


[mapserver-users] Is Shape is nothing but the_geom in PostGIS

2010-09-24 Thread venkat
Dear All,


I am not able to understand is ShapeObj is equal the_geom in the
postgis.


exp : Select the_geom form table.is equal to select shapeObj from table


  I need seed shape object instead of the_geom... is that possible ?
or I should go with some other processAnyone can guide me ..


Please let me know.I am waiting for your great response.

Thanks and Regards,

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


Re: [mapserver-users] Error in msPostGISLayerResultsGetShape(): Got request larger than result set

2010-09-24 Thread Daniel Morissette
Presumably this is related to the change in the way query results are
handled in MapServer 5.6.5 and the Cartoweb code would need to be
updated to use $layer-resultsGetShape() instead of $layer-getShape()
to read query results.

Another option would be for you to go back to MapServer 5.4.x

Daniel

Stefan Neumeier wrote:
 
 
 Dear all,
 
 I am quite new to mapserver and maybe I am just missing some important 
 configuration step but I hope somebody
 of you can help me with following problem:
 
 When trying to perform a query via a cartoweb-client to a layer stored in 
 Postgis I encounter following error message
 (It is only the query that is not working the layer itself renders perfect 
 out of the database):
 
 MapServer error: Error in msDrawMap(): Failed to draw layer named 'bound'.
 
 Error in msPostGISLayerResultsGetShape(): Got request larger than result 
 set.
 
 When I do the same with the layer as shapefile on the file system the query 
 functions as expected.
 
 
 *My system environment is:*
 
cartoweb 3.5.0
php 5.3.3
Mapserver version 5.6.5
Postgis 1.5.1
Postgresql 8.4.4
Operating System: Suse Linux 11.3
 
 *In the mapfile the layer is defined as follows*
 
   LAYER
 NAME bound
 TYPE LINE
 STATUS ON
 CONNECTIONTYPE POSTGIS
 CONNECTION user=*** password=*** host=localhost dbname=gis
 DATA the_geom FROM (select * from dep_france_dom) as foo using unique 
 gid using srid=-1
 TEMPLATE ttt
 METADATA
   id_attribute_string id_geofla
   query_returned_attributes id_geofla
 END
 CLASS
   NAME Boundaries
   STYLE
 COLOR 200 200 200
 OUTLINECOLOR 255 165 96
   END
 END
   END
 
 
 
 
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


-- 
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] OFFSITE more values

2010-09-24 Thread Frank Warmerdam

Sven Schroeter wrote:

Hi,

I have a rasterlayer with more than 1000 .ecw airial photos and want to 
set more than one RGB-value transparent with OFFSITE.

This works fine:
OFFSITE 0 0 0

but I need something like this:
OFFSITE [0 0 0,1 1 1,1 2 1]

Is there a possibility to solve my problem?


Sven,

There is no support for multiple offsite values in MapServer.

If you have ecw file with lossy nodata areas the usual approach is to
convert the files to uncompressed format (ie. GeoTIFF), and then use the
GDAL nearblack utility to convert pixels that are nearly black to black
so there is a single nodata/offset value.

Some folks have also had success deriving a nodata/data mask from this,
and using it to develop an alpha (transparency) band which can then be used
with the original ecw file via use of a GDAL VRT file grouping the extra
band with the original data.  This technique is fairly complicated and can
have some performance impact on MapServer but it does allow using the
original ECW files with exactly masked areas.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

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


Re: [mapserver-users] OFFSITE more values

2010-09-24 Thread Gregor at HostGIS
This fella describes a hack he made to MapServer's source, to give him a 
fuzzy matching for the OFFSITE value:


   http://sites.google.com/site/bpederse/caliwms

It may help you out. It's a fairly simple set of changes.

--
HostGIS, Open Source solutions for the global GIS community
Greg Allensworth - SysAdmin, Programmer, GIS Person, Security
   Network+   Server+   A+   Security+   Linux+
   PHP   PostgreSQL   MySQL   DHTML/JavaScript/AJAX

No one cares if you can back up — only if you can recover.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] ODBC connections 32 vs 64 bit

2010-09-24 Thread Jay Kapalczynski
Question:  I am trying to connect to a MDB on a local driveeverything 
testing on my local computer.
I have a 64 bit windows 7 machine
There are two locations to create ODBC connections:  This article says a bit 
http://support.microsoft.com/kb/942976

32 bit  \Windows\SysWoW64\odbcad32.exe
64 bit   \Windows\System32\odbcad32.exe

Does it matter if the ODBC connection is done on 32 or 64 bit?  Is there a 
difference?
When I try and create an ODBC connection on 64 bit there are no drivers 
displayed?  Very confusing

Thoughts?

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


[mapserver-users] RE: ODBC connections 32 vs 64 bit

2010-09-24 Thread Johan Forsman
If I recall correctly a 32-bit application can only see 32-bit ODBC sources, so 
you must use the 32-bit ODBC utility (C:\Windows\SysWOW64\odbcad32.exe) to 
define the source. I have this scenario on my 64-bit Vista workstation. From 
Access 2007 I can only see the 32-bit version of my Oracle ODBC source, not the 
64-bit version of the source. Access 2007 is a 32-bit application.

Hope that helps,
Johan.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jay Kapalczynski
Sent: Friday, September 24, 2010 9:51 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] ODBC connections 32 vs 64 bit

Question:  I am trying to connect to a MDB on a local driveeverything 
testing on my local computer.
I have a 64 bit windows 7 machine
There are two locations to create ODBC connections:  This article says a bit 
http://support.microsoft.com/kb/942976

32 bit  \Windows\SysWoW64\odbcad32.exe
64 bit   \Windows\System32\odbcad32.exe

Does it matter if the ODBC connection is done on 32 or 64 bit?  Is there a 
difference?
When I try and create an ODBC connection on 64 bit there are no drivers 
displayed?  Very confusing

Thoughts?

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


[mapserver-users] Mapscript c# problem with multiple instances

2010-09-24 Thread James Perrins
Hi,

mapscript_csharp - 32 bit version 1.0.3679.25032 dated 10/1/2010
All supporting DLLs from Tamas' nightly build site (was last stable
version when I grabbed it in January)
.NET 3.5

Actually using this in desktop winform app.  All has been working
fine, until I just tried to move the map rendering into a background
thread to stop locking up the UI.

No matter what I try - this seems to cause my app to crash out of the
background thread (with no error)
Crash always occurs at the point where I first try and do something
with the OSGeo.MapServer.mapObj
Initially it was when I tried to draw the map (having passed in a map object)
So I then tried reading the map file again from the disk (so nothing
was passed in) - in this case it fails when trying to create the map
object from the map file.
I tried extracting the code to a separate DLL (with only text strings
passed in and out) - this still failed
I then tried to run it as a separate AppDomain - which also failed.

The only way I have it working to to actually call a separate exe
using a temp .map file with my map state and having the exe write the
image file back to disk for my main app to pick up.
This does work - but seems rather a hack.

Am I doing something wrong here / misunderstanding something ?  It
seems almost as if I can only have one map object per application - or
they are trampling on each other in some way I don't understand.

Any ideas ?

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


Re: [mapserver-users] Mapscript c# problem with multiple instances

2010-09-24 Thread Tamas Szekeres
James,

While it's not safe to use the same mapscript object by multiple threads
simultaneously, it should work when those threads operate on separate mapObj
instances.
This would pretty much similar to an ASP.NET application utilizing the
mapscript library which I've already used many times this way.

By all means it would be helpful if you could provide a sample project for
this in order to reproduce this behaviour.

Have you already tested with the recent versions of the packages available
from http://vbkto.dyndns.org/sdk/ ?


Best regards,

Tamas



2010/9/24 James Perrins james.perr...@gmail.com

 Hi,

 mapscript_csharp - 32 bit version 1.0.3679.25032 dated 10/1/2010
 All supporting DLLs from Tamas' nightly build site (was last stable
 version when I grabbed it in January)
 .NET 3.5

 Actually using this in desktop winform app.  All has been working
 fine, until I just tried to move the map rendering into a background
 thread to stop locking up the UI.

 No matter what I try - this seems to cause my app to crash out of the
 background thread (with no error)
 Crash always occurs at the point where I first try and do something
 with the OSGeo.MapServer.mapObj
 Initially it was when I tried to draw the map (having passed in a map
 object)
 So I then tried reading the map file again from the disk (so nothing
 was passed in) - in this case it fails when trying to create the map
 object from the map file.
 I tried extracting the code to a separate DLL (with only text strings
 passed in and out) - this still failed
 I then tried to run it as a separate AppDomain - which also failed.

 The only way I have it working to to actually call a separate exe
 using a temp .map file with my map state and having the exe write the
 image file back to disk for my main app to pick up.
 This does work - but seems rather a hack.

 Am I doing something wrong here / misunderstanding something ?  It
 seems almost as if I can only have one map object per application - or
 they are trampling on each other in some way I don't understand.

 Any ideas ?

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

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


[mapserver-users] Re: Raster Display Performance

2010-09-24 Thread goncalo

Hi,

Thanks. I will try that too.
Now I am trying other solutions like use mapnik to tile the map and create
the directory and than use that directory in a http server with sample get
requests directly to the .png files.

I will try both solutions.

Best regards,
Gonçalo
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Raster-Display-Performance-tp4691679p5567337.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] multiple labels? also, symbols forced to display within a polygon?

2010-09-24 Thread Robert Hollingsworth
Are there definitive statements somewhere in the mapserver/mapscript 
documentation on whether/how multiple labels, with their own string 
content, color, font, placement, etc., can ALL be simultaneously displayed 
on each placed feature within a layer?  I've seen some hints that this can 
be done, but the infrastructure does not seem to support it.

I'm doing some rather 'brittle' things with php-mapscript ShapeObj, 
and it appears my attempts to do multiple things with Labels and 
Classes results in the last such action effectively overwriting previous 
actions on the same ShapeObj.  So I want between zero and four labels to 
appear per feature, but only one does.

Really, I'm just trying to display multiple symbols, between zero and five 
per polygon feature, depending on client app params, and that basically 
works, BUT it does not appear that symbol placement exploits the scheme 
used in label placement where the polygon centroid is rejected as 
placement point if said centroid is not within polygon.

Any suggestions or doc refs appreciated,
Thanks,
Robert H

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