Code Monkey home page Code Monkey logo

cadtools's Introduction

geopython

Vanity package for geopython projects

pip install geopython
>>> import geopython

cadtools's People

Contributors

blazek avatar dwsilk avatar kalxas avatar tkan avatar victorkourtelis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cadtools's Issues

Feature Request - Allow to finish creation of object using right click

This would probably need a revamp of the tool but it would be more in line with how you do current edits using standard qgis tools, also this would reduce clicking.

e.g. Select Circular Arc Creation tool (just one icon), you select 3 points then right click to finish, tools keeps in that mode until you select another one.

This would speed up digitizing efforts.

Capture orthogonal lines/polygons do not works

Capture orthogonal lines/polygons function works incorrect. In polygonal layer it draws lines and in line layer it draws points (vertexes). When you trying to complete object creation the error appears.

Traceback (most recent call last):
File "C:\Users\aborodul/.qgis2/python/plugins\cadtools\tools\orthogonaldigitizer.py", line 89, in canvasPressEvent
self.createFeature()
File "C:\Users\aborodul/.qgis2/python/plugins\cadtools\tools\orthogonaldigitizer.py", line 126, in createFeature
layerEPSG = layer.srs().epsg()
AttributeError: 'QgsVectorLayer' object has no attribute 'srs'

Версия Python:
2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

Версия:
2.0.1-Dufour Dufour, exported

QGIS attributes pop-up window after each created feature does not work

QGIS 2.0.1-Dufour
CadTools 0.6.1

In process creating new features (polyline/polygonal) with "Capture Vertical/Horizontal Lines/Polygons" or "Capture Orthogonal Lines/Polygons" tools of CadTools plugin and disabled QGIS option "Suppress attributes pop-up windows after each created feature" (Settings->Options->Digitizing-Feature creation) pop-up window not showing.

modernize UI

proposals:

  1. instead of using a QMessageBox to indicate e.g. too few lines selected use iface.messageBar (with duration), so user needs not click on OK before being able to continue
  2. or (better) activate/deactivate tools according to a proper selection condition
  3. simplify the tool bar by removing redundancy, try to merge all select something into one tool (i.e. seperate tools for line, point, vertex). Proposal 2 needs to be in place for this. E.g. select with left click, deselect with right click and keep the order in which the elements were selected. Thus if two elements are needed by a tool the last two will be used for processing, no matter if more have been selected.

Uncaught IOError: [Errno 9] Bad file descriptor

Steps to reproduce
It is not alway reproducable, but when digitizing and trying to use the measurement tool, it comes up with this error.

Traceback (most recent call last):
  File "C:/Users/Saber/.qgis2/python/plugins\cadtools\tools\modifycirculararctool.py", line 103, in deactivate
    print "***************** deactivate modifycirculararctool"
IOError: [Errno 9] Bad file descriptor

cadtools 0.6.3, QGIS 2.8.9-Wien on Windows 7

Inactive tools

If I have an editable layer before turning on the CADTools plugin, the tool Modify circular arc and the following four tools are inactive. Even if I stop editing and start editing on the same layer, the tools remain inactive, I have to start editing on an other layer to activate these tools.

error when calling its classFactory() method

Installed the plugin manually (offlinepc, Windows 7) under:

C:\Program Files\QGIS Dufour\apps\qgis\python\plugins

Error while lunching QGIS 2.0.1:

Couldn't load plugin cadtools due an error when calling its classFactory() method

Traceback (most recent call last):
  File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python\qgis\utils.py", line 204, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\cadtools\__init__.py", line 26, in classFactory
    return CadTools(iface)
  File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\cadtools\cadtools.py", line 47, in __init__
    self.localePath = pluginPath
UnboundLocalError: local variable 'pluginPath' referenced before assignment

Python version:
2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]


QGIS version:
2.0.1-Dufour Dufour, ebebdf3

Python path: ['C:/PROGRA~1/QGISDU~1/apps/qgis/./python', 'C:\\Users\\user/.qgis2/python', 'C:\\Users\\user/.qgis2/python/plugins', 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins', ...']

I´ve already used Google find a solution - but without luck.
thank you!

Cad tools does not work with latest development QGIS - cannot create layer

Hi,

I just recently came across the problem with latest QGIS. When I create parallel line
Cad tools is asking about CS for new layer (twice), than the following message appears
in Python console

fixed
0.1
Traceback (most recent call last):
File "C:/Users/misha/.qgis2/python/plugins\cadtools\tools\parallellinetool.py", line 142, in createParallelLine
cadutils.addGeometryToCadLayer(g)
File "C:/Users/misha/.qgis2/python/plugins\cadtools\tools\cadutils.py", line 38, in addGeometryToCadLayer
QgsMapLayerRegistry().instance().addMapLayer(vl, True)
TypeError: qgis._core.QgsMapLayerRegistry cannot be instantiated or sub-classed
fixed
0.1
Traceback (most recent call last):
File "C:/Users/misha/.qgis2/python/plugins\cadtools\tools\parallellinetool.py", line 142, in createParallelLine
cadutils.addGeometryToCadLayer(g)
File "C:/Users/misha/.qgis2/python/plugins\cadtools\tools\cadutils.py", line 38, in addGeometryToCadLayer
QgsMapLayerRegistry().instance().addMapLayer(vl, True)
TypeError: qgis._core.QgsMapLayerRegistry cannot be instantiated or sub-classed

CadLayer is not created.

Plugin works fine with released 2.4.0 version.

Thank you
Mikhail

Slow down when editing

I have two machines with QGIS 2.8.3 LTS and CadTools 0.6.3 with big slows down when enabling/disabling editing or saving changes with the plugin enabled. Usually that happens after 30-60 minutos after de file is open. It doesn't matter if It is a database connection (MSSQL) or shapefile/memory layer.

Feature Request - Create Circular Arc selection method for points

Currently to be able to use the tool one has to have a point layer before hand, this leads to double digitizing, you have to first create the points that define the arc in a point layer and later select them using the tool. I think it would be better if the tool could accept snapping points from other layers (lines, points, polygons) but also on screen digitizing, that is clic on point to define it. This is particularly useful when you are tracing imagery.

As it currently stands there is a lot of duplicated effort towards creating arcs and really time consuming once you need to do more than 2 or 3 arcs

When adding several arcs a python exception occurs

An error has occured while executing Python code:

Traceback (most recent call last):
File "C:/Users/Antonio/.qgis2/python/plugins\cadtools\tools\circulararctool.py", line 74, in createCircularArc
self.unsetTool()
File "C:/Users/Antonio/.qgis2/python/plugins\cadtools\tools\circulararctool.py", line 78, in unsetTool
print "***************** unset tool"
IOError: [Errno 9] Bad file descriptor

Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version:
2.5.0-Master Master, dbed468

Python path: ['C:/OSGEO41/apps/qgis-dev/./python/plugins\processing', 'C:/OSGEO41/apps/qgis-dev/./python', u'C:/Users/Antonio/.qgis2/python', u'C:/Users/Antonio/.qgis2/python/plugins', 'C:/OSGEO41/apps/qgis-dev/./python/plugins', 'C:\OSGEO41\bin\python27.zip', 'C:\OSGEO41\apps\Python27\DLLs', 'C:\OSGEO41\apps\Python27\lib', 'C:\OSGEO41\apps\Python27\lib\plat-win', 'C:\OSGEO41\apps\Python27\lib\lib-tk', 'C:\OSGEO41\bin', 'C:\OSGEO41\apps\Python27', 'C:\OSGEO41\apps\Python27\lib\site-packages', 'C:\OSGEO41\apps\Python27\lib\site-packages\PIL', 'C:\OSGEO41\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg', 'C:\OSGEO41\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg', 'C:\OSGEO41\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg', 'C:\OSGEO41\apps\Python27\lib\site-packages\win32', 'C:\OSGEO41\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGEO41\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGEO41\apps\Python27\lib\site-packages\six-1.3.0-py2.7.egg', 'C:\OSGEO41\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\OSGEO4~1\apps\qgis-dev\python\plugins\fTools\tools', 'C:/Users/Antonio/Google Drive/google-glass-project/AMDB/KMEM/qgs']

Create spline lines/polygons

Finishing the spline on a memory layer (CADLayer Lines) by right button click I got the following error:
An error has occured while executing Python code:
Traceback (most recent call last):
File "/home/siki/.qgis2/python/plugins/cadtools/tools/spline.py", line 96, in canvasPressEvent
self.createFeature()
File "/home/siki/.qgis2/python/plugins/cadtools/tools/spline.py", line 148, in createFeature
if dlg.exec_():
AttributeError: 'NoneType' object has no attribute 'exec_'

The condition should be changed to
if dlg is not None and dlg.exec_():
or do not activate tool if memory layer is editable

Intersection tool doesn't work with QGIS2.8.1

Hi,
while trying to create point at intersection of two segment, selecting the first tool and then clicking on the line does nothing. The line doesn't become red as it does with QGIS2.4 (tried also this day). And after having clicked on the two lines (though nothing is shown as selected), when you try to create the point, got message "Not enough line segments selected", confirming that no line has been selected.
Tried arc intersection with success on same layer...

Error when adding rectangular points (QGIS 2.5.0-42)

We tested QGIS 2.5.0-42 with CadTools due to some performance issues (network wise) of older QGIS versions. Performance issues are gone, yet CadTools throws this exception when trying to add a point based on a line segment.
Is this an issue concerning the recent QGIS API or will this be gone in the official 2.6 release?

Rect Points Error
direct link

Thank you.

Uncaught IOError: [Errno 9] Bad file descriptor

Steps to reproduce

  1. First
  2. Second
  3. Third
Traceback (most recent call last):
  File "C:/Users/USER/.qgis2/python/plugins\cadtools\tools\circulararctool.py", line 88, in deactivate
    print "***************** deactivate circulararctool"
IOError: [Errno 9] Bad file descriptor

cadtools 0.6.3, QGIS 2.18.7 on Windows 10

Use of memory layer not as efficient design choice

I believe the plugin uses memory layers to do the work, I think this is problematic since memory layers are really not saved to disk and a qgis crash means loosing whatever you have worked on. An option would be to be saving to file every x amount of time but I think overall the best solution would be for the plugin to edit the layer you want the data you are working on to be written.

Uncaught IOError: [Errno 9] Bad file descriptor

Steps to reproduce

  1. Open QGIS
  2. Edit a lot of polygons
  3. Keep saving as you go until this errors out
Traceback (most recent call last):
  File "C:/Users/k_kie/.qgis2/python/plugins\cadtools\tools\modifycirculararctool.py", line 103, in deactivate
    print "***************** deactivate modifycirculararctool"
IOError: [Errno 9] Bad file descriptor

cadtools 0.6.3, QGIS 2.14.3-Essen on Windows 7

CadTools does not work in QGIS v3

Hello. Do you plan to release this wonderful plugin for GIS3? Maybe there are some other tools with similar functions? In particular, there is very miss of Arc intersection.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.