Opened 5 years ago

Closed 3 years ago

#7121 closed enhancement (wontfix)

DXF: Keep track of object visibility and paper/model space

Reported by: Alan Thomas Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: dxf


Split out from #4369:

Added new attributes for features:

  • "PaperSpace" -> Absent or "0" means model space, "1" means paper space.
  • "Invisible" -> Indicates the object visibility: "0" = visible, "1" = invisible

Paper space uses a completely different coordinate system from model space, so I wonder if we could even just ignore entities in paper space, or alternatively shove them in a different OGR feature layer or something.

Change History (8)

comment:1 by Alan Thomas, 5 years ago

In 40712:

DXF: Correct color for ByBlock text features; respect hidden objects (refs #5592, refs #7099, refs #7121)

comment:2 by Alan Thomas, 5 years ago

Turns out we already supported hidden/frozen layers by making the features on those layers transparent. r40712 adds support for individually hidden/frozen objects as well.

Still to decide what to do with paper space entities.

comment:3 by Marc Weustink, 4 years ago

All nice and well, but this way it is only supported by color. IE, transparent means hidden. If you render this it gives the desired result. But what if you want to do some queries, to get the visible and plotted extent for instance ?

I would like to do something like: select * from entities where visible=1 and plotted=1

it would be nice to distinguish if a layer is visible/frozen/plotted

comment:4 by Alan Thomas, 4 years ago

You can do something like

ogrinfo text-fancy.dxf -al -where "OGR_STYLE LIKE '%c:#______00%'"

to select hidden entities. This will work whether the object is in a hidden layer, or individually hidden.

I don't think we keep track of the other settings. To be honest I can't really make sense of the difference between visible, frozen, and plotted. What do you think is the best behaviour for GDAL here? Also does the new DXF_INCLUDE_RAW_CODE_VALUES config option help you?

comment:5 by Marc Weustink, 4 years ago

Don't know if DXF_INCLUDE_RAW_CODE_VALUES will help, but is sounds promising. I need to find/build a GDAL 2.3 to test. (and before I can use it a mapserver using it)

Initially the difference between visible and frozen weren't clear to me. The answers here make something clear.

Autocad won't process anything on a frozen layer. In case of GDAL I think skipping frozen layers is a bit to much, but having the option would be nice.

Plotted layers are only printed/plotted. For instance I receive maps from our customers where there are utility layers (like grids) which are visible, but not plotted/printed

comment:7 by DonnyV, 4 years ago

Adding a property like "IsVisible" with values 0 or 1 would make it more obvious. It would take the extra step of having to parse the color away. I would still keep the transparent color though. So not to break compatibility.

comment:8 by Even Rouault, 3 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to if it is not already reported there.

Note: See TracTickets for help on using tickets.