Implement getNumFeatures for some drivers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Implement getNumFeatures for some drivers

Tamas Szekeres
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


_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Implement getNumFeatures for some drivers

Lime, Steve D (MNIT)
A filter is basically a where statement so I think it should be considered...
From: mapserver-dev <[hidden email]> on behalf of Tamas Szekeres <[hidden email]>
Sent: Sunday, April 22, 2018 2:36:44 PM
To: [hidden email]
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


_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Implement getNumFeatures for some drivers

Tamas Szekeres
In reply to this post by Tamas Szekeres
Created a pull request with the suggested changes:


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) <[hidden email]>:
A filter is basically a where statement so I think it should be considered...
From: mapserver-dev <[hidden email]> on behalf of Tamas Szekeres <[hidden email]>
Sent: Sunday, April 22, 2018 2:36:44 PM
To: [hidden email]
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



_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Implement getNumFeatures for some drivers

Lime, Steve D (MNIT)

+1 from me (to include it)...


From: Tamas Szekeres <[hidden email]>
Sent: Monday, April 30, 2018 5:34:09 PM
To: Lime, Steve D (MNIT)
Cc: [hidden email]
Subject: Re: [mapserver-dev] Implement getNumFeatures for some drivers
 
Created a pull request with the suggested changes:


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) <[hidden email]>:
A filter is basically a where statement so I think it should be considered...
From: mapserver-dev <[hidden email]> on behalf of Tamas Szekeres <[hidden email]>
Sent: Sunday, April 22, 2018 2:36:44 PM
To: [hidden email]
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



_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Implement getNumFeatures for some drivers

Tamas Szekeres
Since the feature freeze date was scheduled for today and the proposed changes should not break anything, I’ve merged it into master.

Best regards,
Tamas

Sent from my iPhone

2018. máj. 1. dátummal, 20:38 időpontban Lime, Steve D (MNIT) <[hidden email]> írta:

+1 from me (to include it)...


From: Tamas Szekeres <[hidden email]>
Sent: Monday, April 30, 2018 5:34:09 PM
To: Lime, Steve D (MNIT)
Cc: [hidden email]
Subject: Re: [mapserver-dev] Implement getNumFeatures for some drivers
 
Created a pull request with the suggested changes:


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) <[hidden email]>:
A filter is basically a where statement so I think it should be considered...
From: mapserver-dev <[hidden email]> on behalf of Tamas Szekeres <[hidden email]>
Sent: Sunday, April 22, 2018 2:36:44 PM
To: [hidden email]
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



_______________________________________________
mapserver-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-dev