[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mapserver-dev
Subject:    Re: [mapserver-dev] Implement getNumFeatures for some drivers
From:       Tamas Szekeres <szekerest () gmail ! com>
Date:       2018-04-30 22:34:09
Message-ID: CACALY+RTEjZrSdsg+4MCM9P=9MsoMvb4ii-6gaFBS0vcbUxB9w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Created a pull request with the suggested changes:

https://github.com/mapserver/mapserver/pull/5591

Keen to have it included in 7.2 if that's sufficient.

Thanks,

Tamas


2018-04-28 0:48 GMT+02:00 Lime, Steve D (MNIT) <steve.lime@state.mn.us>:

> A filter is basically a where statement so I think it should be
> considered...
> ------------------------------
> *From:* mapserver-dev <mapserver-dev-bounces@lists.osgeo.org> on behalf
> of Tamas Szekeres <szekerest@gmail.com>
> *Sent:* Sunday, April 22, 2018 2:36:44 PM
> *To:* mapserver-dev@lists.osgeo.org
> *Subject:* [mapserver-dev] Implement getNumFeatures for some drivers
>
> Hi Devs,
>
> Currently getNumFeatures is supported by the inline layers only. Would
> that be sufficient to implement this for some other drivers, like  MSSQL,
> PostGIS and OGR?
>
> The database drivers would probably rely on the count() aggegate in the
> SQL query, while we could use  OGR_L_GetFeatureCount for the OGR layers.
>
> I could also imagine a default implementation if we use whichShapes on the
> layer extent and iterate the shapes to calculate the count.
>
> It is also a question whether getNumFeatures should consider the layer
> filter or not.
>
> Best regards,
>
> Tamas
>
>

[Attachment #5 (text/html)]

<div dir="ltr">Created a pull request with the suggested \
changes:<div><br></div><div><a \
href="https://github.com/mapserver/mapserver/pull/5591">https://github.com/mapserver/mapserver/pull/5591</a><br></div><div><br></div><div>Keen \
to have it included in 7.2 if that&#39;s \
sufficient.</div><div><br></div><div>Thanks,</div><div><br></div><div>Tamas</div><div><br></div><div \
class="gmail_extra"><br><div class="gmail_quote">2018-04-28 0:48 GMT+02:00 Lime, \
Steve D (MNIT) <span dir="ltr">&lt;<a href="mailto:steve.lime@state.mn.us" \
target="_blank">steve.lime@state.mn.us</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">



<div>
A filter is basically a where statement so I think it should be considered...
<hr style="display:inline-block;width:98%">
<div id="m_-7547929758317722084divRplyFwdMsg" dir="ltr"><font face="Calibri, \
sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> mapserver-dev &lt;<a \
href="mailto:mapserver-dev-bounces@lists.osgeo.org" \
target="_blank">mapserver-dev-bounces@lists.<wbr>osgeo.org</a>&gt; on behalf of Tamas \
Szekeres &lt;<a href="mailto:szekerest@gmail.com" \
target="_blank">szekerest@gmail.com</a>&gt;<br> <b>Sent:</b> Sunday, April 22, 2018 \
2:36:44 PM<br> <b>To:</b> <a href="mailto:mapserver-dev@lists.osgeo.org" \
target="_blank">mapserver-dev@lists.osgeo.org</a><br> <b>Subject:</b> [mapserver-dev] \
Implement getNumFeatures for some drivers</font> <div>  </div>
</div><div><div class="h5">
<div>
<div dir="ltr">Hi Devs,
<div><br>
</div>
<div>Currently  getNumFeatures is supported by the inline layers only. Would that be \
sufficient to implement this for some other drivers, like   MSSQL, PostGIS and OGR?  \
</div> <div><br>
</div>
<div>The database drivers would probably rely on the count() aggegate in the SQL \
query, while we could use   OGR_L_GetFeatureCount for the OGR layers.</div> <div><br>
</div>
<div>I could also imagine a default implementation if we use whichShapes on the layer \
extent and iterate the shapes to calculate the count.</div> <div><br>
</div>
<div>It is also a question whether getNumFeatures should consider the layer filter or \
not.</div> <div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Tamas</div>
<div><br>
</div>
</div>
</div>
</div></div></div>

</blockquote></div><br></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
mapserver-dev mailing list
mapserver-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic