Re: [mapserver-users] Oracle SYSDATE in EXPRESSION

2016-03-29 Thread Dan Little
Again, you could do that with the stored procedure or in SQL with a view.
And have a column that returns the logical style class. For example,

CREATE VIEW
SELECT
  CASE WHEN permit_date < SYSDATE - 365 * 5 THEN 'old_permit'
   ELSE 'active_permit' END as permit_class,
   ... other columns ...
FROM permits;


Then in the mapbook...

CLASS
 EXPRESSION "[permit_class] == 'old_permit'"
 STYLE
   [ style stuff ]
 END
END

On Tue, Mar 29, 2016 at 11:20 AM, Basques, Bob (CI-StPaul) <
bob.basq...@ci.stpaul.mn.us> wrote:

> Dan,
>
> That would work, but I was trying to color a 5 year old class one color,
> and the rest of them another, and do it all in one SQL call (single layer)
>
> I got it to work in the DATA connection, but was trying to do the STYLE
> based query in the CLASS block.
>
> Seems like it would be doable, but I’m not having any luck yet.  I’m
> guessing that the SYSDATE is not getting passed in correctly along with the
> INDATE value, at least based on what I see when I intentionally break the
> SQL to see the error.
>
> Also, there are only 1700 records to work with in there right now, quick
> return no matter what.
>
> bobb
>
>
> On Mar 29, 2016, at 11:10 AM, Dan Little  wrote:
>
> You're probably better off with a view or querying against a stored
> procedure. There are a few advantages:
> 1. With a view you can create multiple arbitrary views.
> 2. It keeps the syntax of the mapfile cleaner.
> 3. A view is easy to change to a materialized view in Oracle.  That has a
> pile of performance benefits.
> 4. A stored procedure can be used to normalize the data better between
> Oracle and mapserver.
>
>
> On Tue, Mar 29, 2016 at 10:53 AM, Basques, Bob (CI-StPaul) <
> bob.basq...@ci.stpaul.mn.us> wrote:
>
>> All Oracle Guru’s,
>>
>> How do I handle an expression for doing a timed query in Oracle:
>>
>> CLASS
>> *EXPRESSION ('[indate] > SYSDATE - 1825')*
>> COLOR 255 255 254
>> OUTLINECOLOR 0 0 0
>>   SIZE 10
>>   SYMBOL 'circle'
>> NAME "PW Sidewalk Permits"
>> END
>>
>> I want to get all the Permits up to 5 years old to plot.  What should the
>> EXPRESSION line look like above.  I’ve tried all sort of different
>> combinations of quoting, etc.  I either get everything, or nothing.
>>
>> Thanks
>>
>> bobb
>>
>>
>>
>> ___
>> 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] Oracle SYSDATE in EXPRESSION

2016-03-29 Thread Basques, Bob (CI-StPaul)
Dan,

That would work, but I was trying to color a 5 year old class one color, and 
the rest of them another, and do it all in one SQL call (single layer)

I got it to work in the DATA connection, but was trying to do the STYLE based 
query in the CLASS block.

Seems like it would be doable, but I’m not having any luck yet.  I’m guessing 
that the SYSDATE is not getting passed in correctly along with the INDATE 
value, at least based on what I see when I intentionally break the SQL to see 
the error.

Also, there are only 1700 records to work with in there right now, quick return 
no matter what.

bobb


On Mar 29, 2016, at 11:10 AM, Dan Little 
> wrote:

You're probably better off with a view or querying against a stored procedure. 
There are a few advantages:
1. With a view you can create multiple arbitrary views.
2. It keeps the syntax of the mapfile cleaner.
3. A view is easy to change to a materialized view in Oracle.  That has a pile 
of performance benefits.
4. A stored procedure can be used to normalize the data better between Oracle 
and mapserver.


On Tue, Mar 29, 2016 at 10:53 AM, Basques, Bob (CI-StPaul) 
> wrote:
All Oracle Guru’s,

How do I handle an expression for doing a timed query in Oracle:

CLASS
EXPRESSION ('[indate] > SYSDATE - 1825')
COLOR 255 255 254
OUTLINECOLOR 0 0 0
  SIZE 10
  SYMBOL 'circle'
NAME "PW Sidewalk Permits"
END

I want to get all the Permits up to 5 years old to plot.  What should the 
EXPRESSION line look like above.  I’ve tried all sort of different combinations 
of quoting, etc.  I either get everything, or nothing.

Thanks

bobb



___
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] Oracle SYSDATE in EXPRESSION

2016-03-29 Thread Dan Little
You're probably better off with a view or querying against a stored
procedure. There are a few advantages:
1. With a view you can create multiple arbitrary views.
2. It keeps the syntax of the mapfile cleaner.
3. A view is easy to change to a materialized view in Oracle.  That has a
pile of performance benefits.
4. A stored procedure can be used to normalize the data better between
Oracle and mapserver.


On Tue, Mar 29, 2016 at 10:53 AM, Basques, Bob (CI-StPaul) <
bob.basq...@ci.stpaul.mn.us> wrote:

> All Oracle Guru’s,
>
> How do I handle an expression for doing a timed query in Oracle:
>
> CLASS
> *EXPRESSION ('[indate] > SYSDATE - 1825')*
> COLOR 255 255 254
> OUTLINECOLOR 0 0 0
>   SIZE 10
>   SYMBOL 'circle'
> NAME "PW Sidewalk Permits"
> END
>
> I want to get all the Permits up to 5 years old to plot.  What should the
> EXPRESSION line look like above.  I’ve tried all sort of different
> combinations of quoting, etc.  I either get everything, or nothing.
>
> Thanks
>
> bobb
>
>
>
> ___
> 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] Oracle SYSDATE in EXPRESSION

2016-03-29 Thread Basques, Bob (CI-StPaul)
All Oracle Guru’s,

How do I handle an expression for doing a timed query in Oracle:

CLASS
EXPRESSION ('[indate] > SYSDATE - 1825')
COLOR 255 255 254
OUTLINECOLOR 0 0 0
  SIZE 10
  SYMBOL 'circle'
NAME "PW Sidewalk Permits"
END

I want to get all the Permits up to 5 years old to plot.  What should the 
EXPRESSION line look like above.  I’ve tried all sort of different combinations 
of quoting, etc.  I either get everything, or nothing.

Thanks

bobb


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

Re: [mapserver-users] Tinyows as a WFS-T server - error commiting write

2016-03-29 Thread Jeff McKenna
Sorry the correct GeoMOOSE discussion is at: 
http://osgeo-org.1560.x6.nabble.com/Geomoose-users-Vector-editing-with-WFS-T-td5255918.html


-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2016-03-29 9:33 AM, Jeff McKenna wrote:

Hi Andrea,

MS4W includes TinyOWS and demo data, and you can follow along how to
configure it at http://www.ms4w.com/README_INSTALL.html#h-tinyows An
OpenLayers client is also included that is pre-configured for MS4W.

Recently the GeoMOOSE developers (http://www.geomoose.org/) were adding
this to their own demo as well (WFS-T using GeoMOOSE, TinyOWS and MS4W)
and they were successfull. You can follow along that discussion here:
http://osgeo-org.1560.x6.nabble.com/Geomoose-users-using-WFS-T-td5256500.html


Also, for your research be sure to examine the ZOO-Project
(http://www.zoo-project.org/), as it is a very powerful WPS instance, as
well as WFS-T (through either MapServer or GeoServer).  I also plan on
adding it into the base of MS4W soon.  ZOO-Project has so many
highlights, including the ability to have your data in any GDAL/OGR
format.  I honestly hope, as a MapServer PSC member, we can again
discuss the ZOO-Project coming inside the MapServer umbrella, as we had
discussed this earlier, but since then I've noticed several other
MapServer PSC members using ZOO - so maybe we/ZOO were ahead of our
time, and the time is better now.  Note that I am on both the
ZOO-Project and MapServer steering committees.

Thanks for bringing up WFS-T for discussion.

-jeff






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

Re: [mapserver-users] Tinyows as a WFS-T server - error commiting write

2016-03-29 Thread Jeff McKenna

Hi Andrea,

MS4W includes TinyOWS and demo data, and you can follow along how to 
configure it at http://www.ms4w.com/README_INSTALL.html#h-tinyows An 
OpenLayers client is also included that is pre-configured for MS4W.


Recently the GeoMOOSE developers (http://www.geomoose.org/) were adding 
this to their own demo as well (WFS-T using GeoMOOSE, TinyOWS and MS4W) 
and they were successfull. You can follow along that discussion here: 
http://osgeo-org.1560.x6.nabble.com/Geomoose-users-using-WFS-T-td5256500.html


Also, for your research be sure to examine the ZOO-Project 
(http://www.zoo-project.org/), as it is a very powerful WPS instance, as 
well as WFS-T (through either MapServer or GeoServer).  I also plan on 
adding it into the base of MS4W soon.  ZOO-Project has so many 
highlights, including the ability to have your data in any GDAL/OGR 
format.  I honestly hope, as a MapServer PSC member, we can again 
discuss the ZOO-Project coming inside the MapServer umbrella, as we had 
discussed this earlier, but since then I've noticed several other 
MapServer PSC members using ZOO - so maybe we/ZOO were ahead of our 
time, and the time is better now.  Note that I am on both the 
ZOO-Project and MapServer steering committees.


Thanks for bringing up WFS-T for discussion.

-jeff



--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




On 2016-03-29 6:52 AM, Andrea Peri wrote:

Hi ,

I'm try-ed to write on a spatial feature user the tinyows as wfs-t and
qgis 2.14 as wfs client.
But is returned an error.

So I open an issue on tinyows.

https://github.com/mapserver/tinyows/issues/86

I like to know if someone have succesfully used tinyows as a wfs-t
service with qgis client.
Or with other clients wfs-t.

Thx,




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

Re: [mapserver-users] Tinyows exchange coords when POST request.

2016-03-29 Thread Rahkonen Jukka (MML)
Hi,

This is not true "the result will be ALWAYS in reversed format."

The bug seems to be specific for EPSG:3003. See what your own server does with 
EPSG:3067:

http://www502.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS=1.1.0=GetFeature=sita:idstradertline=1=EPSG:3067


http://www502.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS=1.1.0=GetFeature=sita:idstradertline=1=urn:ogc:def:crs:EPSG::3067

No flip which is correct. The place to correct the bug is to find out where 
TinyOWS is analyzing if coordinates must be flipped or not and consider how to 
get EPSG:3003 into the list of no-flip systems.


-Jukka Rahkonen-

Andrea Peri wrote:

> Hi,
I'm evaluting some wfs softwares to start a wfs transactionally with writable 
capabilities.

> After some test sessions using geoserver.

> I start to test the tinyows and notice a strange question about the reversing 
> of axis.

> I send some email and exchange opinion with Olivier and Jukka.
After this I stopthe testing because need to do another urgetn work.
Now I need to restart the question of what wfs use for our service.

> So I restart on tinyows and try to understand better the question of 
> reversing axis.

> So I notice that the tinyows will return the list of srs in URN format in the 
> getcapabilities.
This a very complicated question because the clients will return the values 
listesd in the capabilities.
And if the capabilities report always a reversed format, the result will be 
ALWAYS in reversed format.
:(

I notice infact that when call for a getcapabilities from a tinyows.

http://www502.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS=1.1.0=GetCapabilities

It return always the srs of the layers always using the urn notation:

urn:ogc:def:crs:EPSG::3003urn:ogc:def:crs:EPSG::25832urn:ogc:def:crs:EPSG::4326urn:ogc:def:crs:EPSG::3857urn:ogc:def:crs:EPSG::6707

And this mean that the client will send a request using the same notation.
But these mean also , as reported me from Olivier, thattinyows will return 
always the axis reversed.

This is a sample of a call with a correct axis order:
http://www502.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS=1.1.0=GetFeature=sita:idstradertline=1=EPSG:3003

http://www502.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS=1.1.0=GetFeature=sita:idstradertline=1=urn:ogc:def:crs:EPSG::3003

So I need to understand of the reversing axis in tinyows is a bug patchable or 
a standardized response.
And also I need to understand if is right that the getcapabilites will return 
the srs list always in URN format .

Any hint on this ?

Thx.

A.



--
-
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] Tinyows exchange coords when POST request.

2016-03-29 Thread Andrea Peri
Hi,
I'm evaluting some wfs softwares to start a wfs transactionally with
writable capabilities.

After some test sessions using geoserver.

I start to test the tinyows and notice a strange question about the
reversing of axis.

I send some email and exchange opinion with Olivier and Jukka.
After this I stopthe testing because need to do another urgetn work.
Now I need to restart the question of what wfs use for our service.

So I restart on tinyows and try to understand better the question of
reversing axis.

So I notice that the tinyows will return the list of srs in URN format
in the getcapabilities.
This a very complicated question because the clients will return the
values listesd in the capabilities.
And if the capabilities report always a reversed format, the result
will be ALWAYS in reversed format.
:(

I notice infact that when call for a getcapabilities from a tinyows.

http://www502.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS=1.1.0=GetCapabilities

It return always the srs of the layers always using the urn notation:

urn:ogc:def:crs:EPSG::3003urn:ogc:def:crs:EPSG::25832urn:ogc:def:crs:EPSG::4326urn:ogc:def:crs:EPSG::3857urn:ogc:def:crs:EPSG::6707

And this mean that the client will send a request using the same notation.
But these mean also , as reported me from Olivier, thattinyows will
return always the axis reversed.

This is a sample of a call with a correct axis order:
http://www502.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS=1.1.0=GetFeature=sita:idstradertline=1=EPSG:3003

http://www502.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS=1.1.0=GetFeature=sita:idstradertline=1=urn:ogc:def:crs:EPSG::3003

So I need to understand of the reversing axis in tinyows is a bug
patchable or a standardized response.
And also I need to understand if is right that the getcapabilites will
return the srs list always in URN format .

Any hint on this ?

Thx.

A.



-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users