[mapserver-users] Projection takes less time than no projection ?

2012-12-04 Thread Clément MONIER
Hi All,

I'm using MapServer to generate tiles to overlay on a GoogleMaps base layer.
My data files are WGS84 shapefiles.

So my current mapfile was looking like :

MAP
...
PROJECTION init=epsg:3785 END
...
LAYER
...
PROJECTION init=epsg:4326 END
...
END
...
END

I was wondering about improving response time by disabling on-the-fly 
projection.
So I did pre-project my shp into spherical Mercator first.
And my new mapfile now looks like :

MAP
...
PROJECTIONproj=merca=6378137b=6378137lat_ts=0.0
lon_0=0.0x_0=0.0y_0=0k=1.0units=mnadgrids=@null 
   no_defs END
...
LAYER
...
END
...
END

I do get the same  tiles.
But when asking a single tile using both mapfile, I noticed that the response 
time was higher (about +10%) when the second mapfile was used !

Do you have any idea about what's going on ?

Thanks   Regards

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


Re: [mapserver-users] Projection takes less time than no projection ?

2012-12-04 Thread Smith, Michael ERDC-RDE-CRREL-NH
Clément,

There is an optimized route for reprojection from 4326 - 3857 in MapServer 
(see http://lists.osgeo.org/pipermail/mapserver-dev/2012-February/011956.html) 
so it can be very fast. I can't see how if could be faster than no projection. 
Perhaps the 10% is just within the margin of error? Or did you do the test 
1000's of times and average the results? That might be what it takes to really 
see a difference.

Mike

--
Michael Smith
US Army Corps
Remote Sensing GIS/Center

From: Clément MONIER 
clement.mon...@v-trafic.commailto:clement.mon...@v-trafic.com
Date: Tuesday, December 4, 2012 7:23 AM
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Projection takes less time than no projection ?
Resent-From: Michael Smith 
michael.sm...@usace.army.milmailto:michael.sm...@usace.army.mil

Hi All,

I’m using MapServer to generate tiles to overlay on a GoogleMaps base layer.
My data files are WGS84 shapefiles.

So my current mapfile was looking like :

MAP
…
PROJECTION init=epsg:3785 END
…
LAYER
…
PROJECTION init=epsg:4326 END
…
END
…
END

I was wondering about improving response time by disabling on-the-fly 
projection.
So I did pre-project my shp into spherical Mercator first.
And my new mapfile now looks like :

MAP
…
PROJECTIONproj=merca=6378137b=6378137lat_ts=0.0
lon_0=0.0x_0=0.0y_0=0k=1.0units=mnadgrids=@null 
   no_defs END
…
LAYER
…
END
…
END

I do get the same  tiles.
But when asking a single tile using both mapfile, I noticed that the response 
time was higher (about +10%) when the second mapfile was used !

Do you have any idea about what’s going on ?

Thanks   Regards

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


Re: [mapserver-users] Projection takes less time than no projection ?

2012-12-04 Thread Clément MONIER
Yes, you're right ! thanks a lot !
My projection (epsg dat) def file had some errors.
I made some corrections on my proj espg dat files and it works fine with
PROJECTION init=epsg:3785 END
Everywhere

Response times now make sense : +10% when projection's enabled (on a specific 
test tile)

De : TC Haddad [mailto:tchad...@gmail.com]
Envoyé : mardi 4 décembre 2012 17:29
À : Clément MONIER
Objet : Re: [mapserver-users] Projection takes less time than no projection ?

Strange. Maybe you should check your proj EPSG code list and search for 3785 to 
see if it is listed there (maybe it is missing for some reason?). Or if it is 
in there, compare it to the defs below to look for any mistakes

Tanya
On Tue, Dec 4, 2012 at 7:57 AM, Clément MONIER 
clement.mon...@v-trafic.commailto:clement.mon...@v-trafic.com wrote:
I did try but it didn't give me the same map view (though requested with 
TILE=X+Y+Z)
I don't know why, but (only in the new mapfile version) if I don't put a MAP 
projection block like this

PROJECTION
proj=merc
a=6378137
b=6378137
lat_ts=0.0
lon_0=0.0
x_0=0.0
y_0=0
k=1.0
units=m
nadgrids=@null
no_defs
END

Instead of
PROJECTION init=epsg:3785 END
I don't get the same map's view

De : TC Haddad [mailto:tchad...@gmail.commailto:tchad...@gmail.com]
Envoyé : mardi 4 décembre 2012 16:51
À : Clément MONIER
Objet : Re: [mapserver-users] Projection takes less time than no projection ?

did you try this option for comparison?
MAP
...
PROJECTION init=epsg:3785 END
...
LAYER
...
PROJECTION init=epsg:3785 END
...
END
...
END

On Tue, Dec 4, 2012 at 7:23 AM, Clément MONIER 
clement.mon...@v-trafic.commailto:clement.mon...@v-trafic.com wrote:
MAP
...
PROJECTION init=epsg:3785 END
...
LAYER
...
PROJECTION init=epsg:4326 END
...
END
...
END


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


[mapserver-users] Problem with ODBC connection

2012-12-04 Thread Bistrais, Bob
I want to read the contents of the dbf from a shapefile.  I set up an ODBC 
connection, and have been successful on a development machine, in that I can 
read the dbf and get the results I was looking for.  However, when I move the 
application to another server, I get the following error message:

Warning: odbc_connect(): SQL error: [Microsoft][ODBC Driver Manager] Data 
source name not found and no default driver specified, SQL state IM002 in 
SQLConnect in C:\ms4w_304\apps\geoparcels\htdocs\php\selectparcel.php on line 14
Could Not Connect to ODBC Database!

I was under the impression that MapServer had built-in suffort for shapefiles 
and DBF.  I checked over the php.ini file, but didn't find anything.  So I am 
confused as to why this code works on one machine and not another.  Any ideas 
what to look for?


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


Re: [mapserver-users] MapServer and 24bit Images

2012-12-04 Thread Lime, Steve D (DNR)
I display true-color imagery all the time. I suspect that's not what you're 
trying to do though. You'll have to be more specific on format, perhaps post a 
layer definition?

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Saint
Sent: Monday, December 03, 2012 10:06 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] MapServer and 24bit Images

Dear all, 

I would like to have this confirmation, MapServer support 24bit image with 3 
bands? I have one 24bit image 1 band and I can see in the browser but the other 
with 3 bands I can't. Only appear the the outline line of the class e not the 
image. 

Many thanks
José Santos  



-
José Santos
GIS Analyst
--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/MapServer-and-24bit-Images-tp5020409.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] Problem with ODBC connection

2012-12-04 Thread Bistrais, Bob
Disregard- I forgot to create the odbc data source in Windows on the other 
server.  I set that up and it's working fine now.

Thanks,
BB

-Original Message-
From: Stephen Woodbridge [mailto:wood...@swoodbridge.com] 
Sent: Tuesday, December 04, 2012 12:59 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Problem with ODBC connection

On 12/4/2012 12:45 PM, Bistrais, Bob wrote:
 I want to read the contents of the dbf from a shapefile.  I set up an 
 ODBC connection, and have been successful on a development machine, in 
 that I can read the dbf and get the results I was looking for.  
 However, when I move the application to another server, I get the 
 following error
 message:

 Warning: odbc_connect(): SQL error: [Microsoft][ODBC Driver Manager] 
 Data source name not found and no default driver specified, SQL state
 IM002 in SQLConnect in
 C:\ms4w_304\apps\geoparcels\htdocs\php\selectparcel.php on line 14

 Could Not Connect to ODBC Database!

 I was under the impression that MapServer had built-in suffort for 
 shapefiles and DBF.  I checked over the php.ini file, but didn't find 
 anything.  So I am confused as to why this code works on one machine 
 and not another.  Any ideas what to look for?

It does have native support for reading shapefiles. But if you are using OGR 
that is not mapserver native support.

What does you LAYER definition look like?

Also the you reference php.ini are you using mapscript? Then you might be using 
a PHP to read the shpaefile and not mapserver.

You need to show us more of what you are trying to do. Then we can probably 
help slove this.

-Steve W.


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


Re: [mapserver-users] Zooming

2012-12-04 Thread Lime, Steve D (DNR)
You could write a onClick handler that takes a zoom value, sets a hidden 
variable called zoom and submits the form.

function doZoom(zoom) {
  // set value of zoom hidden variable
  // submit the form
}

input type=hidden name=zoom value=set programmatically

img src=dezoom.png onclick=doZoom(-2) / img src=zoom.png 
onclick=doZoom(2) / 

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Arthur Delorme
Sent: Monday, December 03, 2012 8:03 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Zooming

Hello,

Is there a way to perform a zoom with input instead of select or radio?

I used to do that with the following code but it's not working anymore on 
recent versions of Firefox:

input type=image name=zoom src=dezoom.png value=-2 / input 
type=image name=zoom src=zoom.png value=2 /

Thank you,
Arthur
___
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] System.AccessViolationException on mapscriptPINVOKE.delete_symbolObj

2012-12-04 Thread Huotari, John B (RCIS)
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