Giter Club home page Giter Club logo

cadinput's People

Contributors

3nids avatar olivierdalang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

3nids

cadinput's Issues

distance: use relative

use relative distance: total construction distance vs diff. from previous point distance.
default would be relative.

Distance does not coincide with Googlestreets distance

Hi,
when trying to create line restricted by distance (e.g. 100km), it creates line which is appeared to be 100km according to CADInput, but is about 50km according to Googlestreets (it covers about half of the road drawn in Googlestreets), project is in WGS 84/ EPSG 3857. Is it really a bug or I just don't know how to use the tool appropriately?
thanks!
cadinput_issue_1
cadinput_issue_2

unusable on a big project

I just tried the plugin on a big project (around 40 vector layers), and it is unusable. It takes about 1 sec to display the coordinates.

I believe the problem is in the snapping.

Not sure if it might solve this, but instead of doing 4 snapping, you might want to use QgsSnapper instead of QgsMapCanvasSnapper.
Hence, you should be able to run it only once, and with you proper settings (without changing the project snapping settings).

Here is an example:

    def updateSnapperList(self, dummy=None):
        self.snapperList = []
        tolerance = self.settings.value("selectTolerance")
        units = self.settings.value("selectUnits")
        scale = self.iface.mapCanvas().mapRenderer().scale()
        for layer in self.iface.mapCanvas().layers():
            if layer.type() == QgsMapLayer.VectorLayer and layer.hasGeometryType():
                if not layer.hasScaleBasedVisibility() or layer.minimumScale() < scale <= layer.maximumScale():
                    snapLayer = QgsSnapper.SnapLayer()
                    snapLayer.mLayer = layer
                    snapLayer.mSnapTo = QgsSnapper.SnapToVertex
                    snapLayer.mTolerance = tolerance
                    if units == "map":
                        snapLayer.mUnitType = QgsTolerance.MapUnits
                    else:
                        snapLayer.mUnitType = QgsTolerance.Pixels
                    self.snapperList.append(snapLayer)


   def snapToLayers(self, pixPoint, initPoint=None):
        self.snapping = self.settings.value("obsDistanceSnapping")
        if len(self.snapperList) == 0:
            return initPoint
        snapper = QgsSnapper(self.mapCanvas.mapRenderer())
        snapper.setSnapLayers(self.snapperList)
        snapper.setSnapMode(QgsSnapper.SnapWithResultsWithinTolerances)
        ok, snappingResults = snapper.snapPoint(pixPoint, [])
        self.displaySnapInfo(snappingResults)
        if ok == 0 and len(snappingResults) > 0:
            return QgsPoint(snappingResults[0].snappedVertex)
        else:
            return initPoint

inexact coordinates

when using coordinates lock ( x + y ), the added node is not exactly at the given coordinates.

Snapping Issue

snapping-issues
It seems the snapping isn't behaving as expected, sometimes it leaves a gap of 20 m sometimes mm. I have a point layer in WGS84 projected on the fly and a layer in projected coordinates which is the one to which the project is set.

user origin

Ability to define a user origin.

If you have several measures taken from one point, you may want to enter coordinates from that point. In current version, the only way to do that is to enter in construction mode between each entered point, which is a bit annoying.

Maybe we could even allow for a user axis...

Would this be useful ?

crash when removing the plugin

Traceback (most recent call last):
File "/CadInput/CadInputWidget.py", line 300, in maptoolChanged
File "/CadInput/CadInputWidget.py", line 380, in active
RuntimeError: wrapped C/C++ object of type CadInputWidget has been deleted

contributions

Hi Olivier,
Are you interested in contributions?
I've some ideas (and little python code) on inquirying, building, editing, etc, of vector features:
have you thought about where to collect contributions from third parties?

Thank you very much, sorry for my bad english, best regards,
giuliano curti

x,y coordinates

x-y-coordinates
It seems the x,y coordinates on the CAD form interface don't match the ones in the project. It seems they at some point become relative to a certain feature. Don't know if this may cause confusions

"Geographic" Angle input

Hi Olivier,

It looks like this tool is replacing the Improved Polygon Capture Tool? If so, my request from that one still stands--it would be great to have the ability to enter angles in the format N45D15'30"W.

RuntimeError: no access to protected functions or signals for objects not created from Python

Just testing out the plugin, when it is enabled in plugin manager I get this:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "/Users/timlinux/.qgis2/python/plugins/CadInput/CadGhostWidget.py", line 168, in mouseMoveEvent
    self.iface.mapCanvas().mouseMoveEvent(event)
RuntimeError: no access to protected functions or signals for objects not created from Python

Python version:
2.7.5 (default, Aug 25 2013, 00:04:04) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]


QGIS version:
2.1.0-Master Master, 

Python path: ['/usr/local/Cellar/qgis-20/HEAD/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing', '/usr/local/Cellar/qgis-20/HEAD/QGIS.app/Contents/MacOS/../Resources/python', u'/Users/timlinux/.qgis2/python', u'/Users/timlinux/.qgis2/python/plugins', '/usr/local/Cellar/qgis-20/HEAD/QGIS.app/Contents/MacOS/../Resources/python/plugins', '/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg', '/Library/Python/2.7/site-packages/psycopg2-2.5.2-py2.7-macosx-10.9-intel.egg', '/Library/Python/2.7/site-packages/setuptools-2.1-py2.7.egg', '/usr/local/lib/python2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/usr/local/lib/python2.7/site-packages/wx-3.0-osx_cocoa', '/Users/timlinux/.qgis2/python/plugins/inasafe-dev', '/Users/timlinux/.qgis2/python/plugins/inasafe-dev/third_party', '/usr/local/Cellar/qgis-20/HEAD/QGIS.app/Contents/Resources/python/plugins/fTools/tools']

Tested with 960ac8c
Tested using QGIS Master

Plugin hijacks mouse right-click signal from autoTrace plugin

Hello there,

Right-click no longer allows the user to finish digitising a polygon made using the autoTrace tool / plugin.

CadInput seems to hijack the right-click event (it appears to do this around line 180 in CadEventFilter.py). At present, this occurs even when the Enable CAD input button is not toggled.

Please let me know if you'd like more information / data to reproduce and I'll be happy to send something through.

Kind regards,

Pete

contributions

Hi Olivier,
I'll wait when you're ready to TRY to help with (if you are interested in):

  • Inquirying (coordinates of the points / vertices, lengths, areas, etc.)
  • Diagnostic (points too close, etc ...)
  • Building (points at known distances from other points, under angles known from a base, intersections, fillet, trim, etc. ..)
  • Linear interpolation (points at absolute or percentage distance along a straight line)
  • Quadratic interpolation (arcs, circles, ellipses, partabole)
  • Cubic interpolation (Hermite, Bezier, spline, polynomial)
  • Editing (coordinates updating by the keyboard, line simplification with the RDP, VW and my own algorithm)
  • Transformation (collimation 1, 2 + or 3 points);
    It will need to clean some things already exposed in your plugin or in native functions of qgis;

all the best
giuliano curti

CADinput(Advanced Digitizing Panel) call in plugin(pyqgis)

Hi, How to add a CADInput(Advanced Digitizing Panel) to plugin to click when we want to show us a Advanced Digitizing Panel(because I'm trying to make my own toolbar), for example (self.iface.viewMenu().actions()[6]), when we want a Split Features, is any chance to do this, but not to go with View menu->Panels->Advanced Digitizing Panel ?

snap to useful angles (45/90°)

while digitizing snap at useful angles (45/90) with respect to the last digitized segment or maybe other lines on the canvas

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.