Opened 7 years ago

Last modified 5 years ago

#3215 new defect

The eval of g.proj -g fails due to white space in projection name string

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: LibGIS Version: svn-releasebranch70
Keywords: g.proj Cc:
CPU: Unspecified Platform: Unspecified

Description

Shell parsing of g.proj -g output fails:

# test case:
GRASS 7.2.0svn (nc_spm_08_grass7):~ > g.proj -g
name=Lambert Conformal Conic
proj=lcc
datum=nad83
a=6378137.0
es=0.006694380022900787
lat_1=36.16666666666666
lat_2=34.33333333333334
lat_0=33.75
lon_0=-79
x_0=609601.22
y_0=0
no_defs=defined
epsg=3358
unit=Meter
units=Meters
meters=1


eval `g.proj -g`
bash: Conformal: command not found

Quoting of the "name" key of the proj4 struct is needed in general/g.proj/output.c but I don't know how to implement that properly.

Attachments (1)

g-proj-quote.diff (1.2 KB ) - added by martinl 7 years ago.

Download all attachments as: .zip

Change History (10)

by martinl, 7 years ago

Attachment: g-proj-quote.diff added

comment:1 by martinl, 7 years ago

Please try out attachment:g-proj-quote.diff, are there any other items which could contain spaces?

comment:2 by neteler, 7 years ago

Works, thanks for the NRT patch :)

According to lib/gis/units.c there might be some units like FOOT US and more.

comment:3 by neteler, 7 years ago

Milestone: 7.2.07.2.1

Ticket retargeted after milestone closed

comment:4 by mlennert, 7 years ago

What is the status of this ticket ? Can the patch be applied ?

comment:5 by martinl, 7 years ago

Milestone: 7.2.17.2.2

comment:6 by neteler, 7 years ago

Milestone: 7.2.27.2.3

Ticket retargeted after milestone closed

comment:7 by martinl, 6 years ago

Milestone: 7.2.3

Ticket retargeted after milestone closed

comment:8 by martinl, 6 years ago

Milestone: 7.2.4

comment:9 by neteler, 5 years ago

Milestone: 7.2.47.6.2

@MartinL: please apply the patch to trunk

Note: See TracTickets for help on using tickets.