[ncl-talk] shapefiles problem
Rick Brownrigg
brownrig at ucar.edu
Tue Jan 23 15:43:13 MST 2018
OK, I think I understand now. That particular shapefile, Glaciar, contains
only point features (see dump below) with just 5 features in it. I believe
the shapefile must contain polygonal regions against which to mask.
ncl 0> f=addfile("Glaciares.shp","r")
ncl 1> print(f)
Variable: f
Type: file
filename: Glaciares
path: Glaciares.shp
file global attributes:
layer_name : Glaciares
geometry_type : point
geom_segIndex : 0
geom_numSegs : 1
segs_xyzIndex : 0
segs_numPnts : 1
dimensions:
geometry = 2
segments = 2
num_features = 5 // unlimited
num_segments = 5
num_points = 5
variables:
integer geometry ( num_features, geometry )
integer segments ( num_segments, segments )
double x ( num_points )
double y ( num_points )
integer Id ( num_features )
string Nombre ( num_features )
ncl 2> print(f->Nombre)
Variable: Nombre (file variable)
Type: string
Total Size: 40 bytes
5 values
Number of Dimensions: 1
Dimensions and sizes: [num_features | 5]
Coordinates:
Number Of Attributes: 0
(0) Glaciar Cipreses
(1) Glaciar Palomo
(2) Glaciar Cortaderal
(3) Glaciar Universidad
(4) Glaciar Cotón
On Tue, Jan 23, 2018 at 2:36 PM, Vanúcia Schumacher <
vanucia-schumacher at hotmail.com> wrote:
> Hi
>
>
> The ascii file is a mask with missing values and values in some pixels, as
> in the attached figure.
> The problem is that when I try to create another mask using the shapefile
> (to set only pixels in a specific region- smaller region of the ascii file)
> it returns only missing values.
>
>
> See printVarSummary:
>
> Variable: data
> Type: float
> Total Size: 80496 bytes
> 20124 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 156] x [lon | 129]
> Coordinates:
> lat: [-34.69..-34.51]
> lon: [-70.36..-70.28]
> Number Of Attributes: 3
> lat2d : <ARRAY of 20124 elements>
> lon2d : <ARRAY of 20124 elements>
> _FillValue : -9999
> (0) min=0 max=14.9
> ======================================================================
> (0) Filename: "Glaciares.shp"
> (0) Geometry type: point
> (0) # of features: 5
> (0) Min/max lat: -34.69/ -34.51
> (0) Min/max lon: -70.36/ -70.28
> (0) Variable names and their types:
> (0) geometry : integer
> (0) segments : integer
> (0) x : double
> (0) y : double
> (0) Id : integer
> (0) Nombre : string
> (0) ===========================================================
> ===========
> (0) min=-9999 max=-9999
>
> ------------------------------
> *De:* Rick Brownrigg <brownrig at ucar.edu>
> *Enviado:* terça-feira, 23 de janeiro de 2018 19:16:28
> *Para:* Vanúcia Schumacher
> *Cc:* ncl-talk at ucar.edu
> *Assunto:* Re: [ncl-talk] shapefiles problem
>
> Hi,
>
> Looking at your ascii file, I see its either all missing_values, or a
> handful of zeros. There's nothing to contour in a uniform scalar field, and
> NCL produced the contour plot I would expect in that case.
>
> Hope that helps...
> Rick
>
> On Tue, Jan 23, 2018 at 1:14 PM, Vanúcia Schumacher via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
> I was able to open the shapefile, but I can't plot the data_mask, because
> all the values are missing. I do not know if I'm doing something wrong
> when using the shapefile.
>
>
> I've attached the files I'm using to facilitate
>
>
> I appreciate any help
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180123/e48798b8/attachment.html>
More information about the ncl-talk
mailing list