[MapServer-users] Installing PHP-MapScript from source

2023-10-19 Thread Jan Hartmann via MapServer-users

Still not there. Everything has been installed, and phpinfo() gives:

MapServer Version 	MapServer version 8.0.1 PROJ version 9.3 GDAL version 
3.7 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER 
SUPPORTS=OGCAPI_SERVER INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE INPUT=FLATGEOBUF



But calling "$map = new mapObj('mapfile.map');" gives:

*Fatal error*: Uncaught Error: Class "mapObj" not found in 
/mnt/virdir/www_root/test/test_mapscript.php:2 Stack trace: #0 {main} 
thrown in*/mnt/virdir/www_root/test/test_mapscript.php*on line*2


*Any idea?

Jan___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Inconsistent support for template substitution

2023-10-19 Thread Andrew Harfoot via MapServer-users

Hi Seth,

Thanks for checking that, I see what you mean. I'll submit a pull 
request to correct the logic.


Cheers,

Andy

On 19/10/2023 16:26, Seth G wrote:

*CAUTION:* This e-mail originated outside the University of Southampton.
Hi,

This seems like a bug - there is a check to see if the Map projection 
is a geographic coordinate system [1], and if it is then it skips all 
the [maplon], [maplat], [minlon] etc. substitutions. If it is in 
another projection then the point and extent are reprojected to latlon 
and included in the template.


Seth


[1] 
https://github.com/MapServer/MapServer/blob/main/src/maptemplate.c#L4273


--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Thu, Oct 19, 2023, at 3:50 PM, Andrew Harfoot via MapServer-users 
wrote:


Hi list,

I am setting up a WMS server using Mapserver 7.6.2 and want to return 
a html response to a GetFeatureInfo request where the response 
contains the coordinates of the GFI click. The WMS supports multiple 
coordinate systems, so ideally I'd like to have the coordinates in a 
CRS that I can predetermine.


I have a test template file as follows:



Map X/Y : [mapx],[mapy]
Map LL : [maplon],[maplat]


If I configure an 'old style' TEMPLATE in the map file, directly 
referencing the html template as follows:


LAYER
   TEMPLATE "coord_comp.html"

With a GFI request specifying a CRS of EPSG:27700:

...=WMS=1.3.0=GetFeatureInfo
   
=379766.9556955648586154,58602.32640402266406454,405538.15569556411355734,94300.79913129436317831
   
=EPSG:27700=649=899=test==image/jpeg_LAYERS=test
   _FORMAT=text/html=268=647_COUNT=50


the output of is as follows:

Map X/Y : 390428.846605,68589.162768
Map LL : 50.516415,-2.135015

When a similar requests are made specifying a CRS of EPSG:4326:

...=WMS=1.3.0=GetFeatureInfo
   
=50.33460688675980776,-2.28814701603231718,50.84060858090575863,-1.92285769511938809
   
=EPSG:4326=649=899=test==image/jpeg_LAYERS=test
   _FORMAT=text/html=298=579_COUNT=50

the output is as follows:


Map X/Y : 50.514437,-2.120136
Map LL : [maplon],[maplat]

The maplat and maplon templates are not substituted.

Mapserver has been compiled with PROJ support and a PROJECTION has 
been defined for the layer in the map file.


The CRS of the source data is EPSG:27700

I was hoping that the maplat and maplon templates would provide me 
with a consistent source of coordinate information, independent of 
the request CRS. Can anybody shed any light on the observed behaviour?


Thanks,

Andy

--
Andy Harfoot

Skype: gdi_ajph
Teams:a...@soton.ac.uk  
Phone: +44 2380 590566

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

www.geodata.soton.ac.uk  
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users





--
Andy Harfoot

Skype: gdi_ajph
Teams:a...@soton.ac.uk
Phone: +44 2380 590566

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

www.geodata.soton.ac.uk
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Compiling mapserver with php in user directory

2023-10-19 Thread Jan Hartmann via MapServer-users
Hi Jeff, I appreciate your advice, but I solved the problem with a hack, 
and to be honest, CMAKE error handling is above me. I am still from the 
./configure generation :-)


I added these two lines to MapServer's CMAKE call:

 -DPHP_INCLUDE_PATH=$INSTALLBIN/include/php/main \
-DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829

I also had to add these lines to GEOS's CMAKE, after 
-DCMAKE_INSTALL_PREFIX=$INSTALLBIN  -DCMAKE_PREFIX_PATH=$INSTALLBIN \


-DCMAKE_LIBRARY_PATH=$INSTALLBIN/lib \
-DINCLUDE_DIRECTORIES=$INSTALLBIN/include \

I guess CMAKE does not propagate its dependencies very well from the 
general INSTALL_PREFIX.


But this still didn't work. The php includes in other subdirectories 
than main weren't found. Those subdirectories should have been added to 
the include path, but weren't. So I copied the complete php include 
directory to /usr/include (O horror! :-)) .


Of course a Docker installation would be easier, as you can install 
everything in standard locations. But I want to have a real dedicated 
server with just the software I need and nothing more. I have worked for 
a long time with the UbuntuGIS packages, but they are not supported very 
well.


Thanks for your advice!

Jan



On 18/10/2023 19:11, Jeff McKenna via MapServer-users wrote:

Hi Jan,

I understand that you won't listen to my advice here, no problem at all. 
 But I won't repeat myself here 


Enjoy your afternoon,

-jeff

On 2023-10-18 1:39 p.m., Jan Hartmann wrote:

I compiled with:

  -DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \
  -DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829 



and got lots of error messages about missing .h files (php.h, zend.h 
etc). I bulk copied them all to the directory in the build tree where 
the errors came from, and got a complete build, including 
"php_mapscriptng.so"


So CMAKE is still missing the php include directories. What is de 
correct DEFINE for that?


After I copied php_mapscriptng.so to the correct location and filling 
in php.ini, I got a warning when starting PHP :


Startup: Unable to load dynamic library 'php_mapscriptng.so' (tried: 
/virdir/installbin/lib/php/extensions/no-debug-non-zts-20220829/php_mapscriptng.so 
(libgeos.so.3.12.0: cannot open shared object file: No such file or 
directory)


But  it *is* in that location. Any idea?

On 17/10/2023 21:45, Jeff McKenna via MapServer-users wrote:

Hi Jan,

Unfortunately I have much experience tracking down CMake errors now, 
ha.


Instead of the error log, scroll up and read the output from your 
cmake command (as it does its checks and looks for libraries), I 
find examining that output is crucial (and I personally find the 
actual generated log file is filled of fake/"red-herrings"). Focus 
instead on going line-by-line through that cmake output, as it makes 
its way down to the final "configuring incomplete" message.  (for 
packaging, this is what I do, line-by-line)


For example, if you are trying to enable the GEOS library, I would 
go line-by-line of the output and find where it was looking for GEOS 
initially, and read the messages in that section, to confirm that 
there are no issues when enabling GEOS.  This is crucial.


It takes much time to do this for each library.

In my case, for PHPNG support, my CMake command includes: 
"-DWITH_PHPNG=1 -DPHP_EXTENSION_DIR=/usr/lib/php/20220829"


In your case I am not sure, but, I would start by examining 
line-by-line the CMake output before the words "Configuring 
incomplete" (and totally ignoring the generated 'output' file).


Maybe you can find the PHPNG section in your cmake command output, 
and paste that here for the community to review.


-jeff








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


Re: [MapServer-users] Inconsistent support for template substitution

2023-10-19 Thread Seth G via MapServer-users
Hi,

This seems like a bug - there is a check to see if the Map projection is a 
geographic coordinate system [1], and if it is then it skips all the [maplon], 
[maplat], [minlon] etc. substitutions. If it is in another projection then the 
point and extent are reprojected to latlon and included in the template. 

Seth


[1] https://github.com/MapServer/MapServer/blob/main/src/maptemplate.c#L4273

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Thu, Oct 19, 2023, at 3:50 PM, Andrew Harfoot via MapServer-users wrote:
> Hi list,
> 
> I am setting up a WMS server using Mapserver 7.6.2 and want to return a html 
> response to a GetFeatureInfo request where the response contains the 
> coordinates of the GFI click. The WMS supports multiple coordinate systems, 
> so ideally I'd like to have the coordinates in a CRS that I can predetermine.
> 
> I have a test template file as follows:
> 
>  
> 
> Map X/Y : [mapx],[mapy]
> Map LL : [maplon],[maplat]
> 
> If I configure an 'old style' TEMPLATE in the map file, directly referencing 
> the html template as follows:
> 
> LAYER
>   TEMPLATE "coord_comp.html"
> With a GFI request specifying a CRS of EPSG:27700:
> 
> ...=WMS=1.3.0=GetFeatureInfo
>   
> =379766.9556955648586154,58602.32640402266406454,405538.15569556411355734,94300.79913129436317831
>   
> =EPSG:27700=649=899=test==image/jpeg_LAYERS=test
>   _FORMAT=text/html=268=647_COUNT=50
> 
> 
> 
> the output of is as follows:
> 
> 
> Map X/Y : 390428.846605,68589.162768
> Map LL : 50.516415,-2.135015
> 
> When a similar requests are made specifying a CRS of EPSG:4326:
> 
> ...=WMS=1.3.0=GetFeatureInfo
>   
> =50.33460688675980776,-2.28814701603231718,50.84060858090575863,-1.92285769511938809
>   
> =EPSG:4326=649=899=test==image/jpeg_LAYERS=test
>   _FORMAT=text/html=298=579_COUNT=50
> 
> the output is as follows:
> 
> 
> 
> 
> Map X/Y : 50.514437,-2.120136
> Map LL : [maplon],[maplat]
> 
> The maplat and maplon templates are not substituted.
> 
> Mapserver has been compiled with PROJ support and a PROJECTION has been 
> defined for the layer in the map file.
> 
> The CRS of the source data is EPSG:27700
> 
> I was hoping that the maplat and maplon templates would provide me with a 
> consistent source of coordinate information, independent of the request CRS. 
> Can anybody shed any light on the observed behaviour?
> 
> Thanks,
> Andy
> 
> -- 
> Andy Harfoot
> 
> Skype: gdi_ajph
> Teams: a...@soton.ac.uk
> Phone: +44 2380 590566
> 
> GeoData Institute
> University of Southampton
> Southampton
> SO17 1BJ
> 
> www.geodata.soton.ac.uk
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Inconsistent support for template substitution

2023-10-19 Thread Andrew Harfoot via MapServer-users
I should have added that the behaviour is the same if the template file 
is configured as an OUTPUTFORMAT.


On 19/10/2023 14:50, Andrew Harfoot via MapServer-users wrote:

*CAUTION:* This e-mail originated outside the University of Southampton.

Hi list,

I am setting up a WMS server using Mapserver 7.6.2 and want to return 
a html response to a GetFeatureInfo request where the response 
contains the coordinates of the GFI click. The WMS supports multiple 
coordinate systems, so ideally I'd like to have the coordinates in a 
CRS that I can predetermine.


I have a test template file as follows:



Map X/Y : [mapx],[mapy]
Map LL : [maplon],[maplat]


If I configure an 'old style' TEMPLATE in the map file, directly 
referencing the html template as follows:


LAYER
   TEMPLATE "coord_comp.html"

With a GFI request specifying a CRS of EPSG:27700:

...=WMS=1.3.0=GetFeatureInfo
   
=379766.9556955648586154,58602.32640402266406454,405538.15569556411355734,94300.79913129436317831
   
=EPSG:27700=649=899=test==image/jpeg_LAYERS=test
   _FORMAT=text/html=268=647_COUNT=50

the output of is as follows:

Map X/Y : 390428.846605,68589.162768
Map LL : 50.516415,-2.135015

When a similar requests are made specifying a CRS of EPSG:4326:

...=WMS=1.3.0=GetFeatureInfo
   
=50.33460688675980776,-2.28814701603231718,50.84060858090575863,-1.92285769511938809
   
=EPSG:4326=649=899=test==image/jpeg_LAYERS=test
   _FORMAT=text/html=298=579_COUNT=50

the output is as follows:

Map X/Y : 50.514437,-2.120136
Map LL : [maplon],[maplat]

The maplat and maplon templates are not substituted.

Mapserver has been compiled with PROJ support and a PROJECTION has 
been defined for the layer in the map file.


The CRS of the source data is EPSG:27700

I was hoping that the maplat and maplon templates would provide me 
with a consistent source of coordinate information, independent of the 
request CRS. Can anybody shed any light on the observed behaviour?


Thanks,

Andy

--
Andy Harfoot

Skype: gdi_ajph
Teams:a...@soton.ac.uk
Phone: +44 2380 590566

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

www.geodata.soton.ac.uk

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



--
Andy Harfoot

Skype: gdi_ajph
Teams:a...@soton.ac.uk
Phone: +44 2380 590566

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

www.geodata.soton.ac.uk
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[MapServer-users] Inconsistent support for template substitution

2023-10-19 Thread Andrew Harfoot via MapServer-users

Hi list,

I am setting up a WMS server using Mapserver 7.6.2 and want to return a 
html response to a GetFeatureInfo request where the response contains 
the coordinates of the GFI click. The WMS supports multiple coordinate 
systems, so ideally I'd like to have the coordinates in a CRS that I can 
predetermine.


I have a test template file as follows:



Map X/Y : [mapx],[mapy]
Map LL : [maplon],[maplat]


If I configure an 'old style' TEMPLATE in the map file, directly 
referencing the html template as follows:


LAYER
  TEMPLATE "coord_comp.html"

With a GFI request specifying a CRS of EPSG:27700:

...=WMS=1.3.0=GetFeatureInfo
  
=379766.9556955648586154,58602.32640402266406454,405538.15569556411355734,94300.79913129436317831
  
=EPSG:27700=649=899=test==image/jpeg_LAYERS=test
  _FORMAT=text/html=268=647_COUNT=50

the output of is as follows:

Map X/Y : 390428.846605,68589.162768
Map LL : 50.516415,-2.135015

When a similar requests are made specifying a CRS of EPSG:4326:

...=WMS=1.3.0=GetFeatureInfo
  
=50.33460688675980776,-2.28814701603231718,50.84060858090575863,-1.92285769511938809
  
=EPSG:4326=649=899=test==image/jpeg_LAYERS=test
  _FORMAT=text/html=298=579_COUNT=50

the output is as follows:

Map X/Y : 50.514437,-2.120136
Map LL : [maplon],[maplat]

The maplat and maplon templates are not substituted.

Mapserver has been compiled with PROJ support and a PROJECTION has been 
defined for the layer in the map file.


The CRS of the source data is EPSG:27700

I was hoping that the maplat and maplon templates would provide me with 
a consistent source of coordinate information, independent of the 
request CRS. Can anybody shed any light on the observed behaviour?


Thanks,

Andy

--
Andy Harfoot

Skype: gdi_ajph
Teams:a...@soton.ac.uk
Phone: +44 2380 590566

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

www.geodata.soton.ac.uk
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Postgres DATA query with LIMIT 10 does not work

2023-10-19 Thread Marcin Niemyjski via MapServer-users
Actually, no. Now I know why it's not working.


As you can see in my mapfile, I've activated the time dimension, so it's a 
WMS-T.

The issue looks like this: In the URL, I define the time range I'm interested 
in, and then I request data from DATA block, which in my case looks like this:


DATA 'geometry from (select * from mrc order by maxcc desc LIMIT 10) as 
subquery using unique unique_id'


In my opinion (which I just checked by querying it directly from postgres), the 
key is the subquery, which selects 10 records not from the query containing 
information about TIME and BBOX but simply from the entire table. This returns 
records from the beginning of the table that just don't overlap with the 
requested time period.

So, the problem solver is to implement the TIME parameter in the subquery. Does 
anyone have an idea of how to do that? The only thing that comes to mind is 
breaking it down into two new dimensions: start and stop.


Best regards and thanks,

 Marcin


From: MapServer-users  on behalf of 
Marcin Niemyjski via MapServer-users 
Sent: Thursday, October 19, 2023 12:56 PM
To: mapserver-users@lists.osgeo.org ; Jörg 
Thomsen (WhereGroup) 
Subject: Re: [MapServer-users] Postgres DATA query with LIMIT 10 does not work

hello Jörg,

so, If there's fewer than 10 results, none will be rendered? I taught that 
LIMIT sets only upper border of results count.

and yup, I've just checked it:

SELECT *
FROM (
SELECT *
FROM mrc
WHERE mrc.timestamp >= '2023-08-01' AND mrc.timestamp <= '2023-08-01'
AND ST_Intersects(mrc.geometry, 
ST_GeomFromText('POLYGON((2791286.85068837 5622573.79066471,2791286.85068837 
5638166.03910615,2805874.3941497 5638166.03910615,2805874.3941497 
5622573.79066471,2791286.85068837 5622573.79066471))', 3857))
ORDER BY maxcc DESC
) AS subquery;

query results in only 2 records.

Is there any way to get only 10 or less results using postgis query in 
mapserver?

Best,
Marcin


[cid:3c4ade68-ed3d-4e2c-a9eb-ad74db8b6632]
   Book time to meet with 
me

From: MapServer-users  on behalf of 
Jörg Thomsen (WhereGroup) via MapServer-users 
Sent: Thursday, October 19, 2023 12:18 PM
To: mapserver-users@lists.osgeo.org 
Subject: Re: [MapServer-users] Postgres DATA query with LIMIT 10 does not work

Hello Marcin,

sounds stupid, but are you sure the 10 datasets have geometries within
the requested bbox? I don't see any other problem/mistakes.

Jörg



Am 19.10.23 um 11:39 schrieb Marcin Niemyjski via MapServer-users:
> Hello,
>
>
> I encountered a problem, specifically:
>
> This query works:
>
> |DATA 'geometry from (select * from mrc order by maxcc desc) as subquery
> using unique unique_id' |
>
> However, this query doesn't work:
>
> |DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as
> subquery using unique unique_id' |
>
> Here's the full tileindex definition:
>
> |LAYER  DEBUG 5  STATUS OFF  NAME "time_idx"  TYPE POLYGON
>   CONNECTIONTYPE postgis  CONNECTION "***"  DATA 'geometry from (select
> * from mrc order by maxcc desc limit 10) as subquery using unique
> unique_id'  PROJECTION"init=epsg:3857"  END  VALIDATION 'maxCC'
> '^[0-9]{1,3}$' 'default_maxCC' '100'  END  METADATA"wms_title"
> "tile-index-cloud""wms_timeextent" "2022-02-01/2023-10-10/P1D"
>   "wms_timeitem" "timestamp""wms_timedefault" "2023-10-10"
>   "wms_enable_request" "!*"  END END |
>
> My MapServer version is 7.6.4.
>
> The query results (but returns data in Postgres
> ) in an empty window. I'm following the guidelines provided at
> https://mapserver.org/input/vector/postgis.html#data-access-connection-method 
> .
>
>
> Best,
> marcin
>
> 
> Book time to meet with me 
> 
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users


--
Viele Grüße,
Jörg Thomsen
-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com
-


Jörg Thomsen
WhereGroup GmbH
Bundesallee 23
10717 Berlin
Germany

Tel: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 5130 278 11

joerg.thom...@wheregroup.com
www.wheregroup.com

Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885


Re: [MapServer-users] Postgres DATA query with LIMIT 10 does not work

2023-10-19 Thread Marcin Niemyjski via MapServer-users
hello Jörg,

so, If there's fewer than 10 results, none will be rendered? I taught that 
LIMIT sets only upper border of results count.

and yup, I've just checked it:

SELECT *
FROM (
SELECT *
FROM mrc
WHERE mrc.timestamp >= '2023-08-01' AND mrc.timestamp <= '2023-08-01'
AND ST_Intersects(mrc.geometry, 
ST_GeomFromText('POLYGON((2791286.85068837 5622573.79066471,2791286.85068837 
5638166.03910615,2805874.3941497 5638166.03910615,2805874.3941497 
5622573.79066471,2791286.85068837 5622573.79066471))', 3857))
ORDER BY maxcc DESC
) AS subquery;

query results in only 2 records.

Is there any way to get only 10 or less results using postgis query in 
mapserver?

Best,
Marcin


[cid:3c4ade68-ed3d-4e2c-a9eb-ad74db8b6632]
   Book time to meet with 
me

From: MapServer-users  on behalf of 
Jörg Thomsen (WhereGroup) via MapServer-users 
Sent: Thursday, October 19, 2023 12:18 PM
To: mapserver-users@lists.osgeo.org 
Subject: Re: [MapServer-users] Postgres DATA query with LIMIT 10 does not work

Hello Marcin,

sounds stupid, but are you sure the 10 datasets have geometries within
the requested bbox? I don't see any other problem/mistakes.

Jörg



Am 19.10.23 um 11:39 schrieb Marcin Niemyjski via MapServer-users:
> Hello,
>
>
> I encountered a problem, specifically:
>
> This query works:
>
> |DATA 'geometry from (select * from mrc order by maxcc desc) as subquery
> using unique unique_id' |
>
> However, this query doesn't work:
>
> |DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as
> subquery using unique unique_id' |
>
> Here's the full tileindex definition:
>
> |LAYER  DEBUG 5  STATUS OFF  NAME "time_idx"  TYPE POLYGON
>   CONNECTIONTYPE postgis  CONNECTION "***"  DATA 'geometry from (select
> * from mrc order by maxcc desc limit 10) as subquery using unique
> unique_id'  PROJECTION"init=epsg:3857"  END  VALIDATION 'maxCC'
> '^[0-9]{1,3}$' 'default_maxCC' '100'  END  METADATA"wms_title"
> "tile-index-cloud""wms_timeextent" "2022-02-01/2023-10-10/P1D"
>   "wms_timeitem" "timestamp""wms_timedefault" "2023-10-10"
>   "wms_enable_request" "!*"  END END |
>
> My MapServer version is 7.6.4.
>
> The query results (but returns data in Postgres
> ) in an empty window. I'm following the guidelines provided at
> https://mapserver.org/input/vector/postgis.html#data-access-connection-method 
> .
>
>
> Best,
> marcin
>
> 
> Book time to meet with me 
> 
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users


--
Viele Grüße,
Jörg Thomsen
-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com
-


Jörg Thomsen
WhereGroup GmbH
Bundesallee 23
10717 Berlin
Germany

Tel: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 5130 278 11

joerg.thom...@wheregroup.com
www.wheregroup.com

Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885

---
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com

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


Re: [MapServer-users] Postgres DATA query with LIMIT 10 does not work

2023-10-19 Thread WhereGroup

Hello Marcin,

sounds stupid, but are you sure the 10 datasets have geometries within 
the requested bbox? I don't see any other problem/mistakes.


Jörg



Am 19.10.23 um 11:39 schrieb Marcin Niemyjski via MapServer-users:

Hello,


I encountered a problem, specifically:

This query works:

|DATA 'geometry from (select * from mrc order by maxcc desc) as subquery 
using unique unique_id' |


However, this query doesn't work:

|DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as 
subquery using unique unique_id' |


Here's the full tileindex definition:

|LAYER  DEBUG 5  STATUS OFF  NAME "time_idx"  TYPE POLYGON 
  CONNECTIONTYPE postgis  CONNECTION "***"  DATA 'geometry from (select 
* from mrc order by maxcc desc limit 10) as subquery using unique 
unique_id'  PROJECTION    "init=epsg:3857"  END  VALIDATION     'maxCC' 
'^[0-9]{1,3}$'     'default_maxCC' '100'  END  METADATA    "wms_title" 
"tile-index-cloud"    "wms_timeextent" "2022-02-01/2023-10-10/P1D"   
  "wms_timeitem" "timestamp"    "wms_timedefault" "2023-10-10"   
  "wms_enable_request" "!*"  END END |


My MapServer version is 7.6.4.

The query results (but returns data in Postgres
) in an empty window. I'm following the guidelines provided at 
https://mapserver.org/input/vector/postgis.html#data-access-connection-method .



Best,
marcin


   Book time to meet with me 

 


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



--
Viele Grüße,
Jörg Thomsen
-
Aufwind durch Wissen!
Web-Seminare und Online-Schulungen
bei der www.foss-academy.com
-


Jörg Thomsen
WhereGroup GmbH
Bundesallee 23
10717 Berlin
Germany

Tel: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 5130 278 11

joerg.thom...@wheregroup.com
www.wheregroup.com

Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885

---
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com

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


[MapServer-users] Postgres DATA query with LIMIT 10 does not work

2023-10-19 Thread Marcin Niemyjski via MapServer-users
Hello,


I encountered a problem, specifically:

This query works:

DATA 'geometry from (select * from mrc order by maxcc desc) as subquery using 
unique unique_id'


However, this query doesn't work:

DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as 
subquery using unique unique_id'


Here's the full tileindex definition:

LAYER
 DEBUG 5
 STATUS OFF
 NAME "time_idx"
 TYPE POLYGON

 CONNECTIONTYPE postgis
 CONNECTION "***"

 DATA 'geometry from (select * from mrc order by maxcc desc limit 10) as 
subquery using unique unique_id'

 PROJECTION
   "init=epsg:3857"
 END

 VALIDATION
'maxCC' '^[0-9]{1,3}$'
'default_maxCC' '100'
 END

 METADATA
   "wms_title" "tile-index-cloud"
   "wms_timeextent" "2022-02-01/2023-10-10/P1D"
   "wms_timeitem" "timestamp"
   "wms_timedefault" "2023-10-10"
   "wms_enable_request" "!*"
 END
END


My MapServer version is 7.6.4.

The query results (but returns data in Postgres
) in an empty window. I'm following the guidelines provided at 
https://mapserver.org/input/vector/postgis.html#data-access-connection-method.

Best,
marcin
[https://res.cdn.office.net/assets/bookwithme/misc/CalendarPerson20px.png]
   Book time to meet with 
me
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users