Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a vector layer of 108374 lines I want to split the vector layer into field names of the layer, which is 17. Now, I want to create a new vector layer containing one of the field names e.g. "OBJECTTYPE". From this field name I want to calculate the distance from a certain category to another vector layer.

I have tried to use "split vector layer" in QGIS, but it gives an error: "TypeError: the sip.simplewrapper type cannot be instantiated or sub-classed".

I'm using QGIS 1.8 Lisboa for Mac.

Thanks in advance.

share|improve this question
    
Split vector layer works fine with me. –  Alexandre Neto Mar 12 '13 at 14:52
add comment

1 Answer 1

up vote 2 down vote accepted

Since you want to create a new vector layer, you can accomplish this with a two-step process: Select By Attributes and then Export. This tutorial illustrates the process.

Furthermore, the process probably can be automated with a script so that you don't have to repeat it 17 times.

share|improve this answer
1  
Thanks for the answer. One question though, can this be done if "OBJECTTYPE" is a string (letters) and not numbers? –  Kasper Mar 12 '13 at 14:20
1  
Yes, Select By attributes work with any type. –  Alexandre Neto Mar 12 '13 at 14:53
    
Thank you very much for this clarification. –  Kasper Mar 12 '13 at 15:00
1  
Everything worked perfect! Thank you very much! Kasper –  Kasper Mar 13 '13 at 9:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.