Re: [Qgis-developer] new geom function: combine cascaded

2015-12-18 Thread vinayan
I have been away from the developement for some time, you will need to
check with Marco/Nathan who knows better

On Thu, Dec 17, 2015 at 10:23 AM, lewisvillierme [via OSGeo.org] <
ml-node+s1560n5241707...@n6.nabble.com> wrote:

> Is this function was implemented yet in recent version ?
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1560.x6.nabble.com/new-geom-function-combine-cascaded-tp4112570p5241707.html
> To unsubscribe from new geom function: combine cascaded, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/new-geom-function-combine-cascaded-tp4112570p5242016.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Add yourself to the QGIS Contributor Map

2013-09-20 Thread vinayan
Borys,

From a little investigation, it seems,

First Commit: 10-Nov-2008
commit message - Plugin Installer update: inclusion to i18n git-svn-id:



I got it from ohloh, I think it is somewhat correct
https://www.ohloh.net/p/3663/contributors?query=sort=commits



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Add-yourself-to-the-QGIS-Contributor-Map-tp5078561p5078789.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] IRC issue

2013-08-25 Thread vinayan
Hello,

Sigq has brought all his brothers to irc channel .. pls take care of them..



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/IRC-issue-tp5074158.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] new icons

2013-08-01 Thread vinayan
Hi Denis,

It was great work on some of the icons you did recently(particularly the add
layer icons)..

I am on the side of replacing the topology checker icon..I did that while
playing with Inkscape :)
please consider it if you have time..



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/new-icons-tp5063997p5070377.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] [Plugin presentation] LayerCombination

2013-07-17 Thread vinayan
Hi Olivier,

Really nice feature..Reminded me of the layer filters in AutoCAD..



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Plugin-presentation-LayerCombination-tp5066896p5066994.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Union Tool - Ftools/Sextante - How should the real result be?

2013-05-05 Thread vinayan
Hi,

At present the union tool does not give correct results in sextante/ftools.
After looking at some bug reports, I feel that even in QGIS 1.8, the union
tool was not producing the correct output either attribute-wise or
geometry-wise.

My question is how should the real output be? I have two cases here.

1. Union of a single layer against itself  - 
https://www.dropbox.com/sh/asicnvr71vxeaz2/TKVUpdleIX#f:singleLayerInput.png
2. Union between two different layers -
https://www.dropbox.com/sh/asicnvr71vxeaz2/TKVUpdleIX?lst#f:twoLayerInput.png


It looks to me that for case 1, the result could be like below(11 geometries
in total)
https://www.dropbox.com/sh/asicnvr71vxeaz2/TKVUpdleIX?lst#f:singleLayerResult1.png

and for case 2, the result could be like below 
https://www.dropbox.com/sh/asicnvr71vxeaz2/TKVUpdleIX?lst#f:twoLayerResult1.png

what do you think? Anybody knows how it looked in 1.8?

Thanks
Vinayan



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Union-Tool-Ftools-Sextante-How-should-the-real-result-be-tp5051419.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] the May 4th bug report

2013-05-05 Thread vinayan
Hi Paolo,

I have been picking up bugs from ftools category. Hope to continue on this.

Thanks
Vinayan



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/the-May-4th-bug-report-tp5051314p5051483.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Logo Update

2013-05-03 Thread vinayan
I like 413..It should look good on desktop too..in fact all designs from
412-420 are nice



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Logo-Update-tp5050419p5051137.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] How to see log/debug messages in Osgeo4W installer(qgis-dev)

2013-04-17 Thread vinayan
Hi,

I have an osgeo4w installed Qgis 1.9 in windows xp. Is there any way i can
see the log console?

When i used to run in it from ubuntu build, the './qgis' command used to
show all messages in the terminal? can something similar be done using the
osego4w install?

Thanks
Vinayan




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/How-to-see-log-debug-messages-in-Osgeo4W-installer-qgis-dev-tp5047542.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] How to see log/debug messages in Osgeo4W installer(qgis-dev)

2013-04-17 Thread vinayan
Hi Tim,

It caused a crash when i started the application. It created an empty log
though in the specified log path.
I was hoping there would be a live console



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/How-to-see-log-debug-messages-in-Osgeo4W-installer-qgis-dev-tp5047542p5047575.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools and GdalTools: sextante vs original plugins

2013-04-17 Thread vinayan
+1 for keeping the vector menu.

I think it is best to have maximum algorithms available in c++ ap,  in the
analysis module(i see that some are already available)..I would be willing
to contribute to it if required

thanks
Vinayan



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/fTools-and-GdalTools-sextante-vs-original-plugins-tp5041430p5047742.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] QgsRubberband does not draw polygons(python)

2013-04-08 Thread vinayan
Hi,

I am simply stuck at a seemingly simple issue. I want to create a polygon
rubberband. But even after setting the isPolygon in the constructor to
'True', it is creating a polyline rubberband. I am using latest master
version. Here is what i tried in the python console.

pastebin link http://pastebin.com/bKGJwZkB  

mCanv = iface.mapCanvas()
rb = QgsRubberBand(mCanv,True) #shouldn't this constructor create a polygon
shaped band?
 
rb.addPoint(QgsPoint(300,300))
rb.addPoint(QgsPoint(400,400))
rb.addPoint(QgsPoint(400,600))
 
print rb.asGeometry().exportToWkt()
 
LINESTRING(300.0 300.0, 400.0 400.0, 400.0 600.0)

Shouldn't the exportToWkt() be outputting a Polygon instead of a Linestring?
What am i doing wrong here?

Thanks
Vinayan






--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/QgsRubberband-does-not-draw-polygons-python-tp5045238.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] QgsRubberband does not draw polygons(python)

2013-04-08 Thread vinayan
thanks to Salvatore's help on irc, i got over this issue.

apparently the 'isPolygon' method was deprected..

here is the snippet that worked..

mCanvas = iface.mapCanvas()
rb = QgsRubberBand(mCanvas,QGis.Polygon)
rb.addPoint(QgsPoint(300,300))
rb.addPoint(QgsPoint(400,400))
rb.addPoint(QgsPoint(400,600))
print rb.asGeometry().exportToWkt()
POLYGON((300.0 300.0,400.0 400.0,400.0 600.0,300.0 300.0))




--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/QgsRubberband-does-not-draw-polygons-python-tp5045238p5045248.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Why does the Simplify Feature tool have no normal input field for the tolerance?

2013-04-04 Thread vinayan
+1, that would be a good option..for example, in my data, once I know that
entering 0.05 for the tolerance would be enough to simplify a geometry to my
requirements, it is tiresome to drag the slider everytime..



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Why-does-the-Simplify-Feature-tool-have-no-normal-input-field-for-the-tolerance-tp5044677p5044714.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] rectangle oval digitizing and CAD Tools

2013-04-01 Thread vinayan
I think this has something to do with the missing plugin metadata
:)



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/rectangle-oval-digitizing-and-CAD-Tools-tp5042161p5043915.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] rectangle oval digitizing and CAD Tools

2013-04-01 Thread vinayan
hi..I have made the changes..probably needs approval from mods to show latest
version(1.1.1)in plug-in installer?



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/rectangle-oval-digitizing-and-CAD-Tools-tp5042161p5043937.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] contributing diffs

2013-02-24 Thread vinayan
Hi Larry,

You are correct.. I just had to do a force push :(



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/contributing-diffs-tp5035623p5036509.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] contributing diffs

2013-02-21 Thread vinayan
I also believe a nice workflow should be in the qgis website somewhere.

We have a brief one here at
http://hub.qgis.org/wiki/17/GIT_Workflow

Probably someone could update the above page and link it to the developer
help pages..

Below mentioned link mentions my workflow..what i observed with this is that
I no longer need to do a force push..
http://opengisdev.wordpress.com/2013/02/22/branch-based-workflow-for-qgis/



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/contributing-diffs-tp5035623p5036043.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] How to make my plugin project page a subproject of User Plugins or delete it

2013-02-19 Thread vinayan
Hi,

Is this plugin approved? I would like to uset it. I still cannot get it by
using 'fetch python plugins' in Qgis 1.8.0

Regards
Vinayan




--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/How-to-make-my-plugin-project-page-a-subproject-of-User-Plugins-or-delete-it-tp5034646p5035174.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] creating a windows build out of a git branch from ubuntu

2013-02-12 Thread vinayan
Hi,

I would like to create a windows installer from my git branch. I am
currently developing on Ubuntu 12.04 and would like to know if it is
possible to do this from linux itself. My previous attempts at building in
windows never succeeded. I checked Tim's article about using the nsis
script(http://linfiniti.com/2012/05/quick-tip-build-the-latest-qgis-nightly-build-as-a-standalone-installer-for-windows/).
But i think this article is about creating installer for the latest qgis dev
version.

Anyone got ideas?

Regards
Vinayan



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/creating-a-windows-build-out-of-a-git-branch-from-ubuntu-tp5033834.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] creating a windows build out of a git branch from ubuntu

2013-02-12 Thread vinayan
Hi Denis,

I tried and got a few errors..If it works in any branch, i will explore
more.

http://pastebin.com/H7rrdid1

jef told me it could be due to broken downloads..not sure how i can fix it..

Thanks
Vinayan



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/creating-a-windows-build-out-of-a-git-branch-from-ubuntu-tp5033834p5033853.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] [New Plug-in] Topology Checker - pull request

2013-02-11 Thread vinayan

Hi all,

I have issued a pull request for a topology checker plug-in. Please test 
and provide feedbacks.

https://github.com/qgis/Quantum-GIS/pull/425

Thanks
Vinayan

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] new geom function: combine cascaded

2013-02-10 Thread vinayan
Hi,

Sorry for jumping in on this old thread. Wouldn't it be a really useful
addition to QgsGeometry class? The current union is extremely slow when
large number of geometries are processed. I also think this could be the
real issue in slow dissolve in ftools.

I recently used this on my plugin. Roughly it is around 10 times faster then
normal union. I hope we can introduce a new union method without breaking
the existing union.

Thanks
Vinayan



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/new-geom-function-combine-cascaded-tp4112570p5033306.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] How to get Provider default values for each attribute using Python

2013-02-05 Thread vinayan
Hi Alexandre,

I recently used provider default values in a plugin like this..

provider = layer.dataProvider()
f = QgsFeature()

#On the Fly reprojection.
if layerCRSSrsid != projectCRSSrsid:
geom.transform(QgsCoordinateTransform(projectCRSSrsid,
layerCRSSrsid))

f.setGeometry(geom)

# add attribute fields to feature
fields = layer.pendingFields()

# vector api change update
if QGis.QGIS_VERSION_INT = 10900:
f.initAttributes(fields.count())
for i in range(fields.count()):
f.setAttribute(i,provider.defaultValue(i))
else:
for i in fields:
f.addAttribute(i,  provider.defaultValue(i))



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/How-to-get-Provider-default-values-for-each-attribute-using-Python-tp5032168p5032343.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Plugin update request(RectOvalDigit)

2013-02-04 Thread vinayan
Hi,

I made a small update in Rectangles,Ovals Digitizing Plugin to work with
the current master(1.9.0). Could someone look at approving this updated
version?

http://plugins.qgis.org/plugins/rectovalDigit/


Thanks
Vinayan



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Plugin-update-request-RectOvalDigit-tp5032139.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] geos help(union polygons) (Marco Hugentobler)

2013-01-24 Thread vinayan
On Thursday 24 January 2013 02:45 PM, 
qgis-developer-requ...@lists.osgeo.org wrote:

Send Qgis-developer mailing list submissions to
qgis-developer@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.osgeo.org/mailman/listinfo/qgis-developer
or, via email, send a message with subject or body 'help' to
qgis-developer-requ...@lists.osgeo.org

You can reach the person managing the list at
qgis-developer-ow...@lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than Re: Contents of Qgis-developer digest...


Today's Topics:

1. Re: OpenLayers plugin release and Python API breaks
   (Matthias Kuhn)
2. Re: Redmine frequent errors (Paolo Cavallini)
3. Re: geos help(union polygons) (Marco Hugentobler)
4. Re: OpenLayers plugin release and Python API breaks
   (J?rgen E. Fischer)
5. Re: OpenLayers plugin release and Python API breaks
   (Matthias Kuhn)
6. Re: Cast your vote: Default icon theme for QGIS 2.0 (Tim Sutton)
7. Re: OpenLayers plugin release and Python API breaks
   (J?rgen E. Fischer)
8. Re: OpenLayers plugin release and Python API breaks
   (Matthias Kuhn)


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Hi Marco,

Thanks a lot for your suggestion. It is of great help. I did not know we had 
two geos versions. I have seen QgsGeometry::asGeos() and similar methods but 
never knew it was from C-api.

regards
Vinayan

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] geos help(union polygons)

2013-01-24 Thread vinayan
Dear Marco,

I got it worked. I used GEOSUnionCascaded. On a polygon layer with 121336
features, process completed in around 3 minutes. Earlier I just used to kill
the process after half an hour waiting and memory issues.

Thanks
Vinayan



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/geos-help-union-polygons-tp5029441p5029705.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] geos help(union polygons)

2013-01-23 Thread vinayan

Hi,

I am trying to find gaps inside a polygon layer much like the ESRI 
topology rule(must not have gaps). I did this initially by making an 
extent polygon and then subtracting the union of all geometries from 
this extent polygon.


All this worked well and for around 100 polygons in the extent the 
performance is ok. But when the count goes up, the performance is 
drastically down. The issue, I think is because I am creating the union 
iteratively as below.


for ( it = mFeatureList1.begin(); it != FeatureListEnd; ++it )
{
g2 = it-feature.geometry();
g1 = g1-combine( g2 );
}


From what I read from Martin Davis' 
blog(http://lin-ear-th-inking.blogspot.in/2007/11/fast-polygon-merging-in-jts-using.html), 
the cascaded polygon union improves the performance of union by a large 
ratio.


I want to use the below method that exist in Geos. But I am not sure how 
to use it.


I got this far(also pasted in pastebin http://pastebin.com/rniMLuZW),

std::vectorgeos::geom::Polygon* geomCollection;

QListFeatureLayer::ConstIterator FeatureListEnd = mFeatureList1.end();
for ( it = mFeatureList1.begin(); it != FeatureListEnd; ++it )
{
g1 = it-feature.geometry();
const std::string wkt = g1-exportToWkt().toStdString();
geos::geom::Polygon* geom = 
dynamic_castgeos::geom::Polygon*(geos::io::WKTReader().read(wkt)); 
//error is here

geomCollection.push_back(geom);
}

geos::geom::Geometry* unionedPoly = 
geos::operation::geounion::CascadedPolygonUnion::Union(geomCollection);



The error is,
/home/vinayan/QgisGitWorking/Quantum-GIS/src/plugins/topology/topolTest.cpp:746: 
error: cannot dynamic_cast 
‘geos::io::WKTReader().geos::io::WKTReader::read((*  wkt))’ (of type 
‘struct geos::geom::Geometry*’) to type ‘struct geos::geom::Polygon*’ 
(target is not pointer or reference to complete type)



This has more to do with my c++ knowledge than anything i guess..but if 
anyone can help where I am going wrong, it would be a good step forward 
for me. If it works well, I am sure this function would find use in 
other parts of Qgis where slow unions are involved.


Thanks in advance,
Vinayan

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] New MapTool(Rotate Features)

2013-01-06 Thread vinayan

Hi all,

I have created a new MapTool(c++) for rotating multiple selected 
features interactively using mouse 
movement(https://github.com/qgis/Quantum-GIS/pull/376).


Normal Usage:
Select features on map.
Press mouse and drag to rotate about the selected features' 
bounding-box's center.


Advanced Usage:

User can decide which point should be the anchor point to rotate about. 
A cross appears on the center of bounding-box of selected features by 
default. Hold Control key and move mouse(no pressing) to move this 
cross to the desired anchor position. Release Control key to fix the 
anchor. Now press and drag mouse to rotate about this new anchor.



A very special thanks to Nathan Woodrow for his support on irc channel. 
I had really messed my branching/commits big time and his help was very 
important.


Thanks
Vinayan


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Wish to Support Topology for Qgis

2012-08-10 Thread Vinayan Mp
Dear All,

As a Qgis user,I have always wished there were ways to efficiently view and
fix existing topological errors in data. As I researched a bit, there were
some developments going  around 3 years ago in this regard. I found a
source too in Martin Dobias' Github repository.

If nobody is currently working on it, I would be happy to support the
integration of this to Quantum GIS. I have done something similar in a
popular 2-D drafting application using NetTopologySuite(a c# port of Java
Topology Suite) as a hobby project. Since GEOS is also a port of JTS,
things might be comfortable. As I took a quick look at the code, it seems
to be very close to completion. Though I am not a hardcore C++ developer, I
am sure my C# experience would guide me to work on this.

best regards,
Vinayan
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Pyton Script from Qgis Console Help

2012-03-21 Thread vinayan mp
Hi Asahi,

Thanks a lot for taking your time to review. Appreciate uploading the
edited file. Helped me a lot. And the new script-runner  plugin is simply
stunning.

Thank you
Vinayan


On Wed, Mar 21, 2012 at 8:56 AM, ASAHI Kosuke as...@hcc.co.jp wrote:

 Hi Vinayan

 I can run your script on qgis 1.7.4,
 but I change few points adapt to script runner plugin(see following link).

 http://spatialgalaxy.net/2012/**01/29/script-runner-a-plugin-**
 to-run-python-scripts-in-qgis/http://spatialgalaxy.net/2012/01/29/script-runner-a-plugin-to-run-python-scripts-in-qgis/

 Please run this script on script runner.
  
 http://d.hatena.ne.jp/waigani/**files/rotate.py?d=downloadhttp://d.hatena.ne.jp/waigani/files/rotate.py?d=download

 If you have crash again, I need more infomation (OS? version? etc..).


 (2012/03/21 1:14), vinayan wrote:

 Hi all,

 I just read about running python scrips from Qgis Console(article by
 Gary Sherman
 http://spatialgalaxy.net/2012/**01/27/qgis-running-scripts-in-**
 the-python-console/http://spatialgalaxy.net/2012/01/27/qgis-running-scripts-in-the-python-console/
 ).
 I am trying rotate each point in a layer based on a center point. I
 managed some code by copying from the CadTools plugin(by Stefan
 Ziegler). Whenever i run this from qgis console, it crashes the
 application. Can somebody point me in the right direction? Please find
 the code below. I have to admit that i started python only yesterday.

 Note: I am not sure if this is the place to ask this. But i have been
 inspired by reading


 --**--**
 --**--**
 
 #!/usr/bin/env Python
 Load all shapefiles in a given directory.
 This script (iteratefeature.py) runs from the QGIS Python console.
  From the console, use:
 from iteratefeature import Looper
 ldr = Looper(qgis.utils.iface)
 ldr.LoopXY()

 
 from glob import glob
 from os import path
 from qgis.core import *
 import math

 class Looper:
 def __init__(self, iface):
 Initialize using the qgis.utils.iface
 object passed from the console.

 
 self.iface = iface


 def LoopXY(self):

 basePoint=QgsPoint(-121.**3140824, 38.63196648)
 rotAngle=45

 mc = self.iface.mapCanvas()
 layer = mc.layer(0)
 provider = layer.dataProvider()

 feat = QgsFeature()
 provider.select()


 while(provider.nextFeature(**feat)):
 #layer.startEditing()
 geometry = feat.geometry()
 geom1=rotate(geometry,**basePoint,rotAngle * math.pi / 180)
 layer.changeGeometry(feat.id()**, geom1)
 #feat.setGeometry(geom1)
 #print X Coord %d:  %geometry.asPoint().x()
 #print Y Coord %d:  %geometry.asPoint().y()
 layer.commitChanges()
 print updated %d:  %feat.id()
 print

 # Rotate script
 def rotate(geometry, point, angle):

 if angle == 0 or angle == 2 * math.pi or angle == -2 * math.pi:
 return geom

 p0 = geometry.asPoint()
 p1 = QgsPoint(p0.x() - point.x(), p0.y() - point.y())
 p2 = rotatePoint(p1, angle)
 p3 = QgsPoint(point.x() + p2.x(), point.y() + p2.y())
 return QgsGeometry().fromPoint(p3)


 # Rotates a single point (centre 0/0).
 # (c) Stefan Ziegler
 def rotatePoint(point, angle):
 x = math.cos(angle)*point.x() - math.sin(angle)*point.y()
 y = math.sin(angle)*point.x() + math.cos(angle)*point.y()
 return QgsPoint(x, y)


 --**--**
 --**--**

 Regards
 Vinayan



 __**_
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/**mailman/listinfo/qgis-**developerhttp://lists.osgeo.org/mailman/listinfo/qgis-developer



 --
 ASAHI Kosuke


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Pyton Script from Qgis Console Help

2012-03-20 Thread vinayan

Hi all,

I just read about running python scrips from Qgis Console(article by 
Gary Sherman 
http://spatialgalaxy.net/2012/01/27/qgis-running-scripts-in-the-python-console/). 
I am trying rotate each point in a layer based on a center point. I 
managed some code by copying from the CadTools plugin(by Stefan 
Ziegler). Whenever i run this from qgis console, it crashes the 
application. Can somebody point me in the right direction? Please find 
the code below. I have to admit that i started python only yesterday.


Note: I am not sure if this is the place to ask this. But i have been 
inspired by reading




#!/usr/bin/env Python
Load all shapefiles in a given directory.
  This script (iteratefeature.py) runs from the QGIS Python console.
  From the console, use:
from iteratefeature import Looper
ldr = Looper(qgis.utils.iface)
ldr.LoopXY()

  
from glob import glob
from os import path
from qgis.core import *
import math

class Looper:
def __init__(self, iface):
Initialize using the qgis.utils.iface
object passed from the console.


self.iface = iface


def LoopXY(self):

basePoint=QgsPoint(-121.3140824,  38.63196648)
rotAngle=45

mc = self.iface.mapCanvas()
layer = mc.layer(0)
provider = layer.dataProvider()

feat = QgsFeature()
provider.select()


while(provider.nextFeature(feat)):
#layer.startEditing()
geometry = feat.geometry()
geom1=rotate(geometry,basePoint,rotAngle * math.pi / 180)
layer.changeGeometry(feat.id(), geom1)
#feat.setGeometry(geom1)
#print X Coord %d:  %geometry.asPoint().x()
#print Y Coord %d:  %geometry.asPoint().y()
 layer.commitChanges()
print updated %d:  %feat.id()
print

# Rotate script
def rotate(geometry,  point,  angle):

if angle == 0 or angle == 2 * math.pi or angle == -2 * math.pi:
return geom

p0 = geometry.asPoint()
p1 = QgsPoint(p0.x() - point.x(),  p0.y() - point.y())
p2 = rotatePoint(p1,  angle)
p3 = QgsPoint(point.x() + p2.x(),  point.y() + p2.y())
return QgsGeometry().fromPoint(p3)


# Rotates a single point (centre 0/0).
# (c) Stefan Ziegler
def rotatePoint(point,  angle):
x = math.cos(angle)*point.x() - math.sin(angle)*point.y()
y = math.sin(angle)*point.x() + math.cos(angle)*point.y()
return QgsPoint(x,  y)




Regards
Vinayan

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer