[mapserver-users]    Re: WMS GetfeatureInfo (GetMap Formats)

2010-04-05 Thread SAEZ Laurent - CETE Méditerr./DI/ETER

Hi,
Thank you Daniel for you answer.
I'll try your solution.
Best regards
Laurent

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


Re: [mapserver-users] Re: Adjacent letter problem

2010-04-05 Thread Stephen Woodbridge

Ibrahim Saricicek wrote:

Dear All,

I have this kind of visual problems. Please send a comment..

Thanks in advance..


This is probably not enough info for anyone to comment on.

post a link to  an image showing your problem.
post your mapfile.
post something more so someone can help diagnose your problem.

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


Re: [mapserver-users] Re: Adjacent letter problem [Bayesian]

2010-04-05 Thread ibrahim saricicek
I added map file and an image to
http://n2.nabble.com/Adjacent-letter-problem-td4830536.html#a4830536.
And added a note "send a comment" cos no one answered.

Let me define again,

*This is my style and label definition;*


STYLE
SYMBOL 'otopark_img'
SIZE 30
END
LABEL
COLOR 0 0 0
FONT calibri-bold
TYPE truetype
SIZE 8
POSITION LC
PARTIALS FALSE
OUTLINECOLOR 255 255 255
ALIGN CENTER
WRAP ' '
BUFFER 3
PRIORITY 10
ANTIALIAS TRUE
END

*This is a sample of results;*



*Why are some letters adjecent? How can I prevent this situation?*

Thanks in advance..


On Mon, Apr 5, 2010 at 4:11 PM, Stephen Woodbridge
wrote:

> Ibrahim Saricicek wrote:
>
>> Dear All,
>>
>> I have this kind of visual problems. Please send a comment..
>>
>> Thanks in advance..
>>
>
> This is probably not enough info for anyone to comment on.
>
> post a link to  an image showing your problem.
> post your mapfile.
> post something more so someone can help diagnose your problem.
>
> -Steve W
> ___
> 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] OSOpenData

2010-04-05 Thread Brent Fraser

Lester,


  To get started, assuming you have downloaded the data, you could use GDAL's 
ogrtindex (or gdaltindex for raster) to create a mapserver TILEINDEX of the 
thousands of map tiles...


  There will be lots of other issues:
	- for a particular dataset, are all the .dbf files the same? (a requirement for 
a TILEINDEX)

- is there metadata describing the attributes? (to make the CLASS 
creation easier)
- etc

The desired quality of your output will determine how far you'll have to dig 
into the data...


Best Regards,
Brent Fraser

Lester Caine wrote:
Anybody playing with the maps that OS has no made available. In 
particular anybody looked at how to build a map file for the thousands 
of 10k map tiles?


There is a bit of a bug in that data in that a few grid squares have be 
processed with lower case file names, while the core info files list 
them in upper case but at least they are there.




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


RE: [mapserver-users] How to filter ArcGIS WFS service?

2010-04-05 Thread Fawcett, David (MPCA)
If the bug was on ESRI's side, I am sure the bug would have been fixed just as 
quickly

; /

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Miloslav Kmet
Sent: Saturday, April 03, 2010 8:57 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] How to filter ArcGIS WFS service?

Hi. What a quick response. Thank you very much for that. 


On štvrtok 01 Apríl 2010 21:18:01 you wrote:
> Hi There,
> 
>  It should be now fixed. Bug related to it is
> http://trac.osgeo.org/mapserver/ticket/3414.
> 
> regards,
> 
> Miloslav Kmeť wrote:
> > Hello.
> > 
> > I need to find a solution how to filter ArcGIS wfs service in mapserver
> > WFS client. I read this document:
> > http://mapserver.org/ogc/filter_encoding.html and there is no topic
> > about xml ns prefixes in filter.
> > 
> > It seems, that esri's wfs services need xml namespace ogc: in every
> > filter element.
> > 
> > I tried id with get from browser and this works as expected:
> > eia_eia:IDAKCIA > :PropertyName>1833 > c:Filter>
> > ?service=wfs&version=1.1.0&request=getFeature&typename=eia_eia:EIA_Local
> > ity&filter=%3Cogc:Filter%3E%3Cogc:PropertyIsEqualTo%3E%3Cogc:PropertyName
> > %3Eeia_eia:IDAKCIA%3C/ogc:PropertyName%3E%3Cogc:Literal%3E1833%3C/ogc:Lit
> > eral%3E%3C/ogc:PropertyIsEqualTo%3E%3C/ogc:Filter%3E (tinyurlized:
> > http://tinyurl.com/yanqfry)
> > 
> > But this won't filter anything and gives me all features:
> > eia_eia:IDAKCIA > iteral>1833
> > ?service=wfs&version=1.1.0&request=getFeature&typename=eia_eia:EIA_Local
> > ity&filter=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Eeia_eia:I
> > DAKCIA%3C/PropertyName%3E%3CLiteral%3E1833%3C/Literal%3E%3C/PropertyIsEqu
> > alTo%3E%3C/Filter%3E (tinyurlized: http://tinyurl.com/y9t3rld)
> > 
> > I doubt, that I can get some response from Esri on this topic, because of
> > this thread: http://forums.esri.com/Thread.asp?c=158&f=2276&t=273488
> > where folks
> > 
> > So the question is - how to add the ogc: namespace prefix into
> > wfs_filter?
> > 
> > This is how I have configured the WFS in my mapfile:
> > CONNECTIONTYPE WFS
> > CONNECTION
> > 
> > "http://globus.sazp.sk/arcgis/services/eia/eia/mapserver/wfsserver";
> > 
> > METADATA
> > 
> >   "wfs_version" "1.0.0"
> >   "wfs_service" "WFS"
> >   "wfs_request_method" "GET"
> >   "wfs_srs" "EPSG:4326"
> >   "wfs_typename" "eia_eia:EIA_locality"
> >   "wfs_filter"
> > 
> > "eia_eia:IDAKCIA
> > 1833"
> > 
> >   "wfs_maxfeatures" "1000"
> > 
> > END
> > 
> > Thank you.

-- 
Miloslav Kmeť
Banská Bystrica
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Re: Adjacent letter problem [Bayesian]

2010-04-05 Thread Brent Fraser

Ibrahim,

  It could be the way the character are defined in the font.  Try a different 
font.  Try a different label size.


Or may be it is platform specific.  Which operating system (and version) are you 
using?  Which version of mapserver?  Maybe there's a problem with the options in 
the LABEL definition.  Try


LABEL
  TYPE truetype
  FONT 'arial'
  SIZE 8
  COLOR 0 0 0
END

Brent Fraser

ibrahim saricicek wrote:


I added map file and an image to 
http://n2.nabble.com/Adjacent-letter-problem-td4830536.html#a4830536.

And added a note "send a comment" cos no one answered.

Let me define again,

*This is my style and label definition;*


STYLE
SYMBOL 'otopark_img'
SIZE 30
END
LABEL
COLOR 0 0 0
FONT calibri-bold
TYPE truetype
SIZE 8
POSITION LC
PARTIALS FALSE
OUTLINECOLOR 255 255 255
ALIGN CENTER
WRAP ' '
BUFFER 3
PRIORITY 10
ANTIALIAS TRUE
END

*This is a sample of results;*



*Why are some letters adjecent? How can I prevent this situation?*

Thanks in advance..


On Mon, Apr 5, 2010 at 4:11 PM, Stephen Woodbridge 
mailto:wood...@swoodbridge.com>> wrote:


Ibrahim Saricicek wrote:

Dear All,

I have this kind of visual problems. Please send a comment..

Thanks in advance..


This is probably not enough info for anyone to comment on.

post a link to  an image showing your problem.
post your mapfile.
post something more so someone can help diagnose your problem.

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





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


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


[mapserver-users] Re: Adjacent letter problem [Bayesian]

2010-04-05 Thread Ibrahim Saricicek

Hi;

Mapserver 5.4.0 (ms4w)
I can't change the label size, this is optimum, bigger labels cover so many
ares, smaller can't be read..
I tried; arial, calibri, helvetica, verdana.. all the same??

and with,

LABEL
 TYPE truetype
 FONT 'arial'
 SIZE 8
 COLOR 0 0 0
END

The result is the same..
http://n2.nabble.com/file/n4853853/adjasent.jpg 
-- 
View this message in context: 
http://n2.nabble.com/Adjacent-letter-problem-tp4830536p4853853.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] OSOpenData

2010-04-05 Thread Lester Caine

Brent Fraser wrote:

Lester,


To get started, assuming you have downloaded the data, you could use
GDAL's ogrtindex (or gdaltindex for raster) to create a mapserver
TILEINDEX of the thousands of map tiles...

There will be lots of other issues:
- for a particular dataset, are all the .dbf files the same? (a
requirement for a TILEINDEX)
- is there metadata describing the attributes? (to make the CLASS
creation easier)
- etc

The desired quality of your output will determine how far you'll have to
dig into the data...


Phase one complete ...
http://lsces.co.uk/mapper/display_map.php but unfortunatly the Isle of Man is 
not included in the 10k detail maps :(
Next step is to move the outline to cover the whole UK. The map is all there and 
can be navigated to from the Isle of Man setup.


I'm just looking into using the thesaurus data next so add a search facility.


Lester Caine wrote:

Anybody playing with the maps that OS has no made available. In
particular anybody looked at how to build a map file for the thousands
of 10k map tiles?

There is a bit of a bug in that data in that a few grid squares have
be processed with lower case file names, while the core info files
list them in upper case but at least they are there.






--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Query functions with Oracle Spatial

2010-04-05 Thread Daiane Azevedo de Fraga
Hello!

I tried to execute a query function through an interface. Appeared in the
logfile:
[Mon Apr 05 11:09:19 2010] msOracleSpatialLayerGetShape .621000 ():
OracleSpatial error. Error parsing OracleSpatial DATA is variable query. To
execute query functions you need to define one unique column [USING UNIQUE
<# column>]

I added the ID column, and now appears in the logfile:
[Mon Apr 05 11:11:47 2010] .358000 msOracleSpatialLayerGetShape ():
OracleSpatial error. Error: ORA-00932: inconsistent datatypes: expected %s
returned %s. Query statement: SELECT ID, NBLOCK, SECTOR, BLOCK, ORIGIN,
TYPE, NAME, SUPERCOURT, COURTS, OBSERVATION, AREA, REASON, DATA, REGISTRATION,
SE_ANNO_CAD_DATA, SHAPE FROM LOTS WHERE ID = 43,192. Check your statement
date.

 What can it be? It worked in some cases. The columns are apparently
right...
There may be some incompatibility factor?

Thanks!

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


Re: [mapserver-users] Re: Adjacent letter problem [Bayesian]

2010-04-05 Thread Brent Fraser
It is a result of using a small text size.  The only solution I know of is to 
use a larger size (or perhaps a mono spaced font like Courier).


Ibrahim Saricicek wrote:

Hi;

Mapserver 5.4.0 (ms4w)
I can't change the label size, this is optimum, bigger labels cover so many
ares, smaller can't be read..
I tried; arial, calibri, helvetica, verdana.. all the same??

and with,

LABEL
 TYPE truetype
 FONT 'arial'
 SIZE 8
 COLOR 0 0 0
END

The result is the same..
http://n2.nabble.com/file/n4853853/adjasent.jpg 


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


[mapserver-users] Custom Draw Shape by User

2010-04-05 Thread Varun saraf
Hi,

I am using mapserver as tile layer (USA county boundaries) on google
maps. I have been given a requirement where a user, can go to a
specific zoom level on the maps and draw a custom shape (mostly a
poygon Using GPolygon) on google maps. I then need to provide the user
with an average data of all the counties that fall within this custom
shape. Now, I can fetch the data for every county the user clicks on,
but if the user does not click on a county but it still falls within
the custom shape, is there a way for me to know the same?? Is there a
way to provide this custom shape to mapserver using the geo latitude
and longitide, so mapserver itself can give me the list of all
counties that fall within this?

Please help me in this regard.

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


[mapserver-users] PHP $imgObj->saveImage(null) sends headers

2010-04-05 Thread Miloslav Kmeť
Hi. I am trying to use php_mapscript in MVC framework (symfony) and I want to 
catch the output of $imgObje->saveImage(null); for the later processing, eg: 
using the builtin cache mechanism instead of directly writing the file to the 
cache.

My code very simplified looks like:

ob_start();// start output buffering
$imgObj->saveImage(null);  // print output to std
$image = ob_get_clean();   // get the buffer and clen it

header('Content-type: image/jpeg'); // setting the header
echo $image; // printing the image

At the header line I got an header already sended error, even no output will 
be brinted before.

I looked into php_mapscript.c and I found that in the saveImage function there 
is php_header(TSRMLS_C); As I do not know the PHP internals, i do not know 
what that call is doing, but when I removed it out, and recompiled the 
extension,

Now output buffering is working correctly.

What is the function doing? Should it be replaced in the main development?

Thanks
-- 
Miloslav Kmeť
Index: mapscript/php3/php_mapscript.c
===
--- mapscript/php3/php_mapscript.c	(revision 10043)
+++ mapscript/php3/php_mapscript.c	(working copy)
@@ -6447,9 +6447,6 @@
 
 retVal = 0;
 
-
-php_header(TSRMLS_C);
-
 if( MS_DRIVER_GD(im->format) || MS_DRIVER_AGG(im->format))
   iptr = (void *)msSaveImageBuffer(im, &size, im->format);
 else if (im->format->name && strcasecmp(im->format->name, "imagemap")==0)
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] PHP $imgObj->saveImage(null) sends headers

2010-04-05 Thread Pavel Iacovlev
1) Your php code is not correct I think, ob_get_clean  just cleans the
output and does not return the captured content.
2) Try with no framework, maybe it sends some headers before you run your code.

This works for me in Zend Framework in MVC mode, should work for symfony too.
ob_start();
$image->saveimage('');
$image = imagecreatefromstring(ob_get_contents());
ob_end_clean();
imagepng($image);

2010/4/5 Miloslav Kmeť :
> Hi. I am trying to use php_mapscript in MVC framework (symfony) and I want to
> catch the output of $imgObje->saveImage(null); for the later processing, eg:
> using the builtin cache mechanism instead of directly writing the file to the
> cache.
>
> My code very simplified looks like:
>
> ob_start();                            // start output buffering
> $imgObj->saveImage(null);  // print output to std
> $image = ob_get_clean();   // get the buffer and clen it
>
> header('Content-type: image/jpeg'); // setting the header
> echo $image; // printing the image
>
> At the header line I got an header already sended error, even no output will
> be brinted before.
>
> I looked into php_mapscript.c and I found that in the saveImage function there
> is php_header(TSRMLS_C); As I do not know the PHP internals, i do not know
> what that call is doing, but when I removed it out, and recompiled the
> extension,
>
> Now output buffering is working correctly.
>
> What is the function doing? Should it be replaced in the main development?
>
> Thanks
> --
> Miloslav Kmeť
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



-- 
http://iap.md, The future is open
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] PHP $imgObj->saveImage(null) sends headers

2010-04-05 Thread Pavel Iacovlev
Oh sorry, your code is correct thought you used ob_end_clean and you
are using ob_get_clean. But the snippet works for me with out any
phpmapscript modification.

2010/4/5 Pavel Iacovlev :
> 1) Your php code is not correct I think, ob_get_clean  just cleans the
> output and does not return the captured content.
> 2) Try with no framework, maybe it sends some headers before you run your 
> code.
>
> This works for me in Zend Framework in MVC mode, should work for symfony too.
> ob_start();
> $image->saveimage('');
> $image = imagecreatefromstring(ob_get_contents());
> ob_end_clean();
> imagepng($image);
>
> 2010/4/5 Miloslav Kmeť :
>> Hi. I am trying to use php_mapscript in MVC framework (symfony) and I want to
>> catch the output of $imgObje->saveImage(null); for the later processing, eg:
>> using the builtin cache mechanism instead of directly writing the file to the
>> cache.
>>
>> My code very simplified looks like:
>>
>> ob_start();                            // start output buffering
>> $imgObj->saveImage(null);  // print output to std
>> $image = ob_get_clean();   // get the buffer and clen it
>>
>> header('Content-type: image/jpeg'); // setting the header
>> echo $image; // printing the image
>>
>> At the header line I got an header already sended error, even no output will
>> be brinted before.
>>
>> I looked into php_mapscript.c and I found that in the saveImage function 
>> there
>> is php_header(TSRMLS_C); As I do not know the PHP internals, i do not know
>> what that call is doing, but when I removed it out, and recompiled the
>> extension,
>>
>> Now output buffering is working correctly.
>>
>> What is the function doing? Should it be replaced in the main development?
>>
>> Thanks
>> --
>> Miloslav Kmeť
>>
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>
>
>
> --
> http://iap.md, The future is open
>



-- 
http://iap.md, The future is open
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Converting Shapefiles into tiles

2010-04-05 Thread Kishore Reddy
Hi all,

I am trying to display relief shaded maps (converted from shape files) using
GDAL and GRASS appropriately. But my problem is if I convert whole Shapefile
into one geotiff file, the output(geotiff) file is loosing many details due
to the resolution problem. Can anyone suggest me a way that I can convert
Shapefile into tiles with appropriate resolution so that I can get many
geotiff files for the same Shapefile?

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


Re: [mapserver-users] Re: Adjacent letter problem [Bayesian]

2010-04-05 Thread Stephen Woodbridge

Ibrahim Saricicek wrote:

Hi;

Mapserver 5.4.0 (ms4w)
I can't change the label size, this is optimum, bigger labels cover so many
ares, smaller can't be read..
I tried; arial, calibri, helvetica, verdana.. all the same??

and with,

LABEL
 TYPE truetype
 FONT 'arial'
 SIZE 8
 COLOR 0 0 0
END

The result is the same..
http://n2.nabble.com/file/n4853853/adjasent.jpg 


Try adding:
  ANTIALIAS TRUE
to your LABEL block.

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


Re: [mapserver-users] PHP $imgObj->saveImage(null) sends headers

2010-04-05 Thread Miloslav Kmeť
Hi I am sure, that I get an error with the latest code in this branch: 
https://svn.osgeo.org/mapserver/branches/branch-5-6/mapserver

My PHP version is 5.3.2.

Try this simple frameworkless php code:

draw();

ob_start();
$img->saveImage(null);
$data = ob_get_clean();

header('Content-type: image/jpeg');
echo $data;
?>

The error is:
Warning: Cannot modify header information - headers already sent in 
/www/test/buffer/mapserver/ob-reproduce.php on line 11

I do not have a problem with collecting the data or using them. The problem is 
to send headers after $img->saveImage(null) call.

Because of the symfony's framework behaviour - controller creates the data and 
the response later send them with additional headers I cannot send the headers 
before $img->saveImage();

If you change your code and puts the header('Content-type: image/png'); before 
imagepng($image); you will see that error.

Thank you for giving a try.
 
On pondelok 05 Apríl 2010 19:37:02 you wrote:
> Oh sorry, your code is correct thought you used ob_end_clean and you
> are using ob_get_clean. But the snippet works for me with out any
> phpmapscript modification.
> 
> 2010/4/5 Pavel Iacovlev :
> > 1) Your php code is not correct I think, ob_get_clean  just cleans the
> > output and does not return the captured content.
> > 2) Try with no framework, maybe it sends some headers before you run your
> > code.
> > 
> > This works for me in Zend Framework in MVC mode, should work for symfony
> > too. ob_start();
> > $image->saveimage('');
> > $image = imagecreatefromstring(ob_get_contents());
> > ob_end_clean();
> > imagepng($image);
> > 
> > 2010/4/5 Miloslav Kmeť :
> >> Hi. I am trying to use php_mapscript in MVC framework (symfony) and I
> >> want to catch the output of $imgObje->saveImage(null); for the later
> >> processing, eg: using the builtin cache mechanism instead of directly
> >> writing the file to the cache.
> >> 
> >> My code very simplified looks like:
> >> 
> >> ob_start();// start output buffering
> >> $imgObj->saveImage(null);  // print output to std
> >> $image = ob_get_clean();   // get the buffer and clen it
> >> 
> >> header('Content-type: image/jpeg'); // setting the header
> >> echo $image; // printing the image
> >> 
> >> At the header line I got an header already sended error, even no output
> >> will be brinted before.
> >> 
> >> I looked into php_mapscript.c and I found that in the saveImage function
> >> there is php_header(TSRMLS_C); As I do not know the PHP internals, i do
> >> not know what that call is doing, but when I removed it out, and
> >> recompiled the extension,
> >> 
> >> Now output buffering is working correctly.
> >> 
> >> What is the function doing? Should it be replaced in the main
> >> development?
> >> 
> >> Thanks
> >> --
> >> Miloslav Kmeť
> >> 
> >> ___
> >> mapserver-users mailing list
> >> mapserver-users@lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > 
> > --
> > http://iap.md, The future is open

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


Re: [mapserver-users] PHP $imgObj->saveImage(null) sends headers

2010-04-05 Thread Pavel Iacovlev
I get no errors with your code, and yes I have header() before output,
I use it with Zend Framework so it does the same thing with headers as
symphony does.

PHP 5.2.4-2ubuntu5.10 with Suhosin-Patch 0.9.6.2 (cli) (built: Jan  6
2010 22:01:14)
MapScript: 5.6.0 (will compile latest and test against it)

Error reporting:
error_reporting(E_ALL | E_STRICT);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);

2010/4/5 Miloslav Kmeť :
> Hi I am sure, that I get an error with the latest code in this branch:
> https://svn.osgeo.org/mapserver/branches/branch-5-6/mapserver
>
> My PHP version is 5.3.2.
>
> Try this simple frameworkless php code:
>
>  error_reporting(E_ALL);
> ini_set('display_errors', 'on');
> $map = ms_newMapObj('./test.map'); // select your usual mapfile
> $img = $map->draw();
>
> ob_start();
> $img->saveImage(null);
> $data = ob_get_clean();
>
> header('Content-type: image/jpeg');
> echo $data;
> ?>
>
> The error is:
> Warning: Cannot modify header information - headers already sent in
> /www/test/buffer/mapserver/ob-reproduce.php on line 11
>
> I do not have a problem with collecting the data or using them. The problem is
> to send headers after $img->saveImage(null) call.
>
> Because of the symfony's framework behaviour - controller creates the data and
> the response later send them with additional headers I cannot send the headers
> before $img->saveImage();
>
> If you change your code and puts the header('Content-type: image/png'); before
> imagepng($image); you will see that error.
>
> Thank you for giving a try.
>
> On pondelok 05 Apríl 2010 19:37:02 you wrote:
>> Oh sorry, your code is correct thought you used ob_end_clean and you
>> are using ob_get_clean. But the snippet works for me with out any
>> phpmapscript modification.
>>
>> 2010/4/5 Pavel Iacovlev :
>> > 1) Your php code is not correct I think, ob_get_clean  just cleans the
>> > output and does not return the captured content.
>> > 2) Try with no framework, maybe it sends some headers before you run your
>> > code.
>> >
>> > This works for me in Zend Framework in MVC mode, should work for symfony
>> > too. ob_start();
>> > $image->saveimage('');
>> > $image = imagecreatefromstring(ob_get_contents());
>> > ob_end_clean();
>> > imagepng($image);
>> >
>> > 2010/4/5 Miloslav Kmeť :
>> >> Hi. I am trying to use php_mapscript in MVC framework (symfony) and I
>> >> want to catch the output of $imgObje->saveImage(null); for the later
>> >> processing, eg: using the builtin cache mechanism instead of directly
>> >> writing the file to the cache.
>> >>
>> >> My code very simplified looks like:
>> >>
>> >> ob_start();                            // start output buffering
>> >> $imgObj->saveImage(null);  // print output to std
>> >> $image = ob_get_clean();   // get the buffer and clen it
>> >>
>> >> header('Content-type: image/jpeg'); // setting the header
>> >> echo $image; // printing the image
>> >>
>> >> At the header line I got an header already sended error, even no output
>> >> will be brinted before.
>> >>
>> >> I looked into php_mapscript.c and I found that in the saveImage function
>> >> there is php_header(TSRMLS_C); As I do not know the PHP internals, i do
>> >> not know what that call is doing, but when I removed it out, and
>> >> recompiled the extension,
>> >>
>> >> Now output buffering is working correctly.
>> >>
>> >> What is the function doing? Should it be replaced in the main
>> >> development?
>> >>
>> >> Thanks
>> >> --
>> >> Miloslav Kmeť
>> >>
>> >> ___
>> >> mapserver-users mailing list
>> >> mapserver-users@lists.osgeo.org
>> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> >
>> > --
>> > http://iap.md, The future is open
>
> --
> Miloslav Kmeť
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
http://iap.md, The future is open
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Tutorial examples broken and missing.

2010-04-05 Thread geep999

Hi,

1/ I'm a new user of Mapserver on Slackware Linux fighting against the
tutorial.
Examples 1-5 to 1-8 are broken on http://demo.mapserver.org and locally on
http://localhost

msLoadSymbolSet(): Unknown identifier. First token must be SYMBOLSET, this
doesn't look like a symbol file.

I fixed these examples on my own mapserver by adding SYMBOLSET as first line
of symbols35.sym
Perhaps somebody could fix the official version.

2/ Example 1-9 doesn't exist.

3/ Examples 2.1 to 2.5 are all broken, and I don't know where to get the
source of the examples to try them myself.
(example2.map and example2-1.html through example2-5.html

Same error as above:
msLoadSymbolSet(): Unknown identifier. First token must be SYMBOLSET, this
doesn't look like a symbol file.

4/ The link on this page - 
http://mapserver.org/introduction.html#how-do-i-get-help
http://mapserver.org/introduction.html#how-do-i-get-help  - 
to "Search the archives" -  http://www.nabble.com/MapServer-f1214.html
http://www.nabble.com/MapServer-f1214.html  is just wrong.
The link points to some Spanish guys, seemingly chattng about seeds.

5/ This isn't the best introduction in the world to new users of mapserver.
Hope someone can fix these niggles as mapserver deserves it.

Cheers,
Peter 
-- 
View this message in context: 
http://n2.nabble.com/Tutorial-examples-broken-and-missing-tp4855840p4855840.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Query functions with Oracle Spatial

2010-04-05 Thread Smith, Michael ERDC-CRREL-NH
Daiane,

What version of Mapserver are you using? I suspect a version before 5.4 ( I
think that is when it changed ). The SE_ANNO_CAD_DATA field is a BLOB and
not a supported return type for queries. You can either upgrade to a newer
version of Mapserver which excludes BLOB fields or you can write a view to
exclude that column and query the view.

Mike


-- 
Michael Smith
RSGIS Center
US Army Corps of Engineers

 

On 4/5/10 12:33 PM, "Daiane Azevedo de Fraga" 
wrote:

> Hello!
> 
> I tried to execute a query function through an interface. Appeared in the
> logfile: 
> [Mon Apr 05 11:09:19 2010] msOracleSpatialLayerGetShape .621000 ():
> OracleSpatial error. Error parsing OracleSpatial DATA is variable query. To
> execute query functions you need to define one unique column [USING UNIQUE <#
> column>] 
> 
> I added the ID column, and now appears in the logfile:
> [Mon Apr 05 11:11:47 2010] .358000 msOracleSpatialLayerGetShape ():
> OracleSpatial error. Error: ORA-00932: inconsistent datatypes: expected %s
> returned %s. Query statement: SELECT ID, NBLOCK, SECTOR, BLOCK, ORIGIN, TYPE,
> NAME, SUPERCOURT, COURTS, OBSERVATION, AREA, REASON, DATA, REGISTRATION,
> SE_ANNO_CAD_DATA, SHAPE FROM LOTS WHERE ID = 43,192. Check your statement
> date.
> 
> What can it be? It worked in some cases. The columns are apparently right...
> There may be some incompatibility factor?
> 
> Thanks!
> 
> --
> Daiane
> 
> 
> 
> 
> ___
> 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