[mapserver-users] Re: Problem with Class Expression

Paolo Corti pcorti at gmail.com
Thu Mar 29 13:35:33 PDT 2012


On Thu, Mar 29, 2012 at 7:45 PM, Marc-André D. <qc_mad at hotmail.com> wrote:
> It seems that my column 'AREA' is a calculated one....but how could I
> interrogated that column??? I think the column 'AREA' refer to an other
> shapefile....but how could I create an expression that will interrogate
> another shapefile????
>

Simplest way is to use ogr2ogr using the -sql option, computing the
area with the OGR_GEOM_AREA special field:

$ ogr2ogr output.shp input.shp -sql 'select field1, field2, ...,
fieldn, OGR_GEOM_AREA as AREA from input'

p

-- 
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti



More information about the MapServer-users mailing list