--
--
You received this message because you are subscribed to the GeoScript mailing list.
To post to this group, send email to geos...@googlegroups.com
To unsubscribe from this group, send email to geoscript+...@googlegroups.com
Visit this group at http://groups.google.com/group/geoscript or see http://geoscript.org
---
You received this message because you are subscribed to the Google Groups "GeoScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoscript+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
import geoscript.workspace.PostGIS
def omardb = new PostGIS('omardb-prod', user: 'postgres')
def layer = omardb.createView('images_by_file_type',
"select * from raster_entry where file_type='%file_type%'",
omardb['raster_entry'].schema.geom,
params: [['file_type', 'nitf']])
println "nitfs: ${layer?.count()}"
println "cadrgs: ${layer?.count(params: [file_type: 'cadrg'])}"
omardb?.close()
nitfs: 7
cadrgs: 12
omardb-prod=# select file_type, count(*) from raster_entry group by file_type order by file_type;
file_type | count
-----------+-------
cadrg | 12
cib | 2
nitf | 7
(3 rows)