[gradsusr] [Bug report] gxout shape in -poly mode does not honor clevs or cint

Stefan Gofferje stefan at saakeskus.fi
Fri Jun 28 07:09:48 EDT 2019


Hi Jennifer,

you are right, I confused them in the email. But not in the script. When 
I open a poly shapefile drawn with

'set gxout shp'
'set shp -line /tmp/grads-tmp'
'set clevs 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 
1500 1750 2000 2250 2500 2750 3000 3250 3500'
'd capesfc'

When opening the shapefile then in QGIS, QGIS gives me the following 
description of the features:

Index MIN_VALUE MAX_VALUE
0     -100.0     200.0
1      200.0     400.0
2      400.0     600.0
3      600.0     700.0
4      700.0     900.0
5      900.0    1100.0
6     1100.0    1300.0
7     1300.0    1500.0
8     1500.0    2000.0
9     2000.0    2250.0
10    2250.0    2750.0
11    2750.0    3250.0
12    3250.0    4778.0

When opening a line shapefile, I get CNTR_VALUEs exactly according to 
the clevs.

Shapefiles:
Poly: https://www.saakeskus.fi/data/capesfc-100.zip
Line: https://www.saakeskus.fi/data/capesfcline-100.zip

BR:Stefan

-- 
Suomen Sääkeskus - Hyvä sää on makuasia

http://www.saakeskus.fi/
stefan at saakeskus.fi
On 6/28/19 3:18 AM, Jennifer M Adams wrote:
> Hi, Stefan —
> I think you are confusing the options for drawing and creating 
> shapefiles. The clevs/cint settings are used when writing out the 
> shapefiles with ‘gxout shp’. When drawing the shapefiles you have 
> created, use the shpopts command to set the fill color, or else use ‘set 
> line’ to control the line characteristics if you are not filling them 
> in.  Here is a sample script:
> 
> 'open model.ctl'
> 'set lat 0 20'
> 'set lon 0 40’
> 
> 'set gxout shp'
> 'set shp -poly shp20'
> 'set cint 20'
> 'd ps'
> say result
> 
> 'set shp -poly shp10'
> 'set cint 10'
> 'd ps'
> say result
> 
> ‘clear'
> 'set gxout shaded'
> 'set cint 20'
> 'd ps’
> 
> 'set line 0 1 10'
> 'draw shp shp20’
> 
> 'set line 0 5 2’
> 'draw shp shp10’
> 
> 'q shpopts'
> say result
> 
> That yields the following output to the terminal:
> 
> ga-> testshp
> Contouring: 800 to 1000 interval 20
> 26 polygons written to shapefile shp20
> 
> Contouring: 790 to 1010 interval 10
> 30 polygons written to shapefile shp10
> 
> Settings for drawing shapefiles:
>   polygon fill color: -1
>   mark type: 3
>   mark size: 0.05
> Settings for writing shapefiles:
>   output filename root: shp10
>   format string: %12.6f
> 
> 
> 
> And here is the display:
> 
> 
> 
> 
>> On Jun 27, 2019, at 7:26 AM, Stefan Gofferje <stefan at saakeskus.fi 
>> <mailto:stefan at saakeskus.fi>> wrote:
>>
>> Grads version: 2.2.1
>> Platform: Ubuntu Server 16.04
>>
>> Observed behaviour:
>> When using gxout shp with shpopts -poly to create shapefiles, grads 
>> does not honor clevs or cint setting issued before the draw command.
>> With shpopts -line, cint and/or clevs ARE honored
>>
>> Expected behaviour:
>> Grads should honor clevs/cint settings also when creating shape files 
>> in -poly mode.
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>> http://secure-web.cisco.com/1csXQglMUxbB7uGEcAEAqquZTYZbQus_1RgX8mRCTTQ-1G2hk8DITolrVrKfflYDKr8j1wPNSJ_iUmVCp-ELyHrtJLWMjvHkBzaqfORg9Sc8MyzuXMJuBIjNXnT0eQXmhd6ppFKg0OKntQLdkRA1Yjmec10aHkIZKRHOZaW4Yo-fp0vV6aCwWZfhR9WbhEQ5LUHyuqFtL8WBYmrcyHC-OYyDQZmnkadLKB4Kn5JT6kOD3hG4IWwUdSPChRF19RywOv5_Wa4ldPffewT_Qf0AbyNrZ_-gFjZOHbY6Wyb6_xjvZSrbQbyPVYosaBN_ie9ihZOZG4JYF43XWgpjhDNMwHYMEsVUrD4WR-bBTeSIkea71WnbmEx1l1aEl3xSJyJHt_NOYvaHAGzNwts4AgyAXW0VnyWqe8S1IAV4cBbLEhdYA3unBumhzs8hG3QeGEHjQ/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr
>>
> 
> --
> Jennifer Miletta Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> George Mason University
> 
> 
> 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> 



More information about the gradsusr mailing list