Skip to content

delineate() and plotDelineations() issues with addtopo and elev plot arguements #92

@dsilas

Description

@dsilas

Hello, thanks for this impressive package. I have been fiddling around with delineate() to identify reflectors and horizons. It seems that with a GPR object that has coordinates added, delineations made when the plot has addTopo = T or elev = T with coords on, cannot plot correctly with plotDelineations() if you replot the same object but with addTopo = F. The same is true visa versa. It would be convenient if the function did the math for the user so delineations made to a GPR object with coords would appear correctly regardless of the plotting arguments you decide to plot the GPR object with. I think the same thing happens with hyperbolas too.

library(RGPR)
gpr_topocorrect = gainAGC(interpPosFromXYZ(frenkeLine00,xyz = frenkeTopo00))

sample_reflector <- list(
  x= c(23.32410909,24.51200732,24.98716661,27.04619020,28.86763414,31.08504416,34.72793205,37.18292172,42.56806033),
  y=c(88.02512734,91.08566153,98.22690798,105.36815442,105.36815442,123.73135957,112.50940087,135.97349634,126.79189376))
delineated_gpr = delineate(gpr_topocorrect,values = sample_reflector)
# zrel column seems rounded?
print(delineations(delineated_gpr)[1])
plot(delineated_gpr)
lines(sample_reflector,lwd=2)
points(sample_reflector,pch=4,lwd=2)
# plots as expected
plotDelineations(delineated_gpr,lwd="3",col="green")
#delineation not appear, because the delineation was identified without topo/elevation on the plot, although the gpr object had coords already
plot(delineated_gpr,addTopo = T,elev=F)
plotDelineations(delineated_gpr,lwd="3",col="green")



# Adding deliniations with topo on but elev off.
plot(gpr_topocorrect,addTopo=T,elev=F)
sample_reflector_topo = list(
  x=c(23.38931038,24.74575641,28.52021492,30.58437192,34.29985451,37.95636120,43.38214530),
  y=c(2.467659703,3.023396342,3.393887435,4.181181007,3.718067141,5.200031511,4.505360713)
)
delineated_gpr_topo = delineate(gpr_topocorrect,values = sample_reflector_topo,addTopo=T,elev=F)
# zrel column seems rounded?
print(delineations(delineated_gpr_topo)[1])
lines(sample_reflector_topo,lwd=2)
points(sample_reflector_topo,pch=4,lwd=2)
# plots as expected
plotDelineations(delineated_gpr_topo,lwd="3",col="green")
# will not plot correctly with elev = T
plot(delineated_gpr_topo,addTopo=T,elev=T)
plotDelineations(delineated_gpr_topo,lwd="3",col="green")
# also will not plot correctly
plot(delineated_gpr_topo,addTopo=F)
plotDelineations(delineated_gpr_topo,lwd="3",col="green")

# adding delineations with the topo on and elevations turned on
plot(gpr_topocorrect,addTopo=T,elev=T)
sample_reflector_topo_elev = list(
  x=sample_reflector_topo$x,
  y=-(sample_reflector_topo$y) + 347
)
delineated_gpr_topo_elev = delineate(gpr_topocorrect,values = sample_reflector_topo_elev,addTopo=T,elev=T)
# zrel column seems rounded?
print(delineations(delineated_gpr_topo_elev)[1])
lines(sample_reflector_topo_elev,lwd=2)
points(sample_reflector_topo_elev,pch=4,lwd=2)
# plots as expected
plotDelineations(delineated_gpr_topo_elev,lwd="3",col="green")
# will not plot correctly with elev = F
plot(delineated_gpr_topo_elev,addTopo=T,elev=F)
plotDelineations(delineated_gpr_topo_elev,lwd="3",col="green")
# also will not plot correctly
plot(delineated_gpr_topo,addTopo=F)
plotDelineations(delineated_gpr_topo_elev,lwd="3",col="green")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions