[Qgis-user] Merging Shapefiles on Top of Each Other

David Fawcett david.fawcett at gmail.com
Tue Jun 23 08:00:48 PDT 2015


Tom,

I don't know anything about the software that you are using to render the
features, but here is a trick that I used to use with Mapserver.  Shapefile
features are generally rendered in the order that they are stored in the
file(s).

You may want to try sorting the features so that the sectors are rendered
before the roads, this would put the roads on top of the sectors.

Here is a link to the sortshp utility, but I don't think that you want to
install MapServer just for this utility:
http://mapserver.org/utilities/sortshp.html (of course if you are using
OSGEO4W, it is easy to install)

You can also probably do this pretty easily using a SQL snippet and OGR:
http://www.gdal.org/ogr_sql.html  It may also be pretty simple in QGIS.

David.





On Mon, Jun 22, 2015 at 10:00 AM, Tom Lennon <tolennon at gmail.com> wrote:

> Hi Tom
> I betting that your merged file has NULL in the color-item you used for
> all polygons from the roads source.
> If that is so you could try changing the NULL color-item to a value not
> included in the valid sectors color-item.
> Then go to properties > style and click CLASSIFY to get the new color-item
> included.
> Right click the color swatch in the legend, choose change transparency and
> make the color 99 percent transparent.
> You can also change the outline color to be different to that of the
> sector outline.
> Hope it works.
>
> Regards
>
> On Mon, Jun 22, 2015 at 6:19 AM, DelazJ <delazj at gmail.com> wrote:
>
>> Hi,
>> Tom, so you have both roads and sectors in same shapefile.
>> To show all of them, unless you use rule-based renderer style, in
>> categorized style, they should have a common field filled.
>> Once you have set the colors for all, at the right bottom of the dialog,
>> you have an "Advanced" button. Use "symbol level" option to set which color
>> will be on top of which one...
>>
>> Regards,
>>
>> 2015-06-22 10:33 GMT+02:00 Paulo van Breugel <p.vanbreugel at gmail.com>:
>>
>>> If you want one shapefile only, you might want a topologically correct
>>> file, i.e., no overlapping polygons / boundaries. These could be created
>>> using the v.clean function (a GRASS function available in the QGIS toolbox).
>>>
>>>
>>> On Mon, Jun 22, 2015 at 9:55 AM, Tom Faro <
>>> Tom.Faro at zenith-insurance.co.uk> wrote:
>>>
>>>>  Hi David,
>>>>
>>>> My apologies to both you and Matt as I should have been clearer. My aim
>>>> is to merge them both so that I can use this shapefile in another piece of
>>>> software (which will only accept one shapefile to be viewed at a time).
>>>> However, what you are both suggesting does work perfectly if I want to stay
>>>> in QGIS, so thanks very much for your help!
>>>>
>>>> Regards,
>>>> Tom
>>>>
>>>>
>>>>
>>>>    Tom Faro
>>>>
>>>> Pricing Analyst
>>>>
>>>> Zenith Insurance Management UK Ltd
>>>>
>>>>
>>>>
>>>> E-Mail :
>>>>
>>>> Tom.Faro at zenith-insurance.co.uk
>>>>
>>>> Web :
>>>>
>>>> www.zenith-insurance.co.uk
>>>>
>>>> Address :
>>>>
>>>> Chester House, Harlands Road, Haywards Heath, West Sussex, RH16 1LR
>>>>
>>>>
>>>>
>>>> Zenith Insurance Management UK Limited, a part of the Markerstudy Group
>>>> of Companies
>>>>
>>>>  *From:* David Fawcett [mailto:david.fawcett at gmail.com]
>>>> *Sent:* 19 June 2015 15:06
>>>> *To:* Matt Boyd
>>>> *Cc:* Tom Faro; qgis-user at lists.osgeo.org
>>>> *Subject:* Re: [Qgis-user] Merging Shapefiles on Top of Each Other
>>>>
>>>>
>>>>
>>>> Tom,
>>>>
>>>> As Matt says, you don't need to combine the roads and sectors into the
>>>> same dataset to display them together in QGIS.  You can add both separate
>>>> datasets to a map and you can order the layers so that the roads are drawn
>>>> after the polygons.
>>>>
>>>> David.
>>>>
>>>>
>>>>
>>>> On Thu, Jun 18, 2015 at 11:02 PM, Matt Boyd <mattslists at gmail.com>
>>>> wrote:
>>>>
>>>> Hi Tom,
>>>>
>>>> Have a look at some of the QGIS tutorials (google or the QGIS website
>>>> shoudl have some). It sounds like you just need to overlay the layers in
>>>> the correct order, merge generally means something else.
>>>>
>>>> You can drag / move the layers around / up / down in the layers window.
>>>> Generally from top to bottom, points, lines, polygons. There is also an
>>>> option to give each layer a level of transparency.
>>>>
>>>>
>>>>
>>>> On Thu, Jun 18, 2015 at 8:59 PM, Tom Faro <
>>>> Tom.Faro at zenith-insurance.co.uk> wrote:
>>>>
>>>>
>>>>
>>>> I have been having some trouble with merging two shapefiles – one is a
>>>> map of all sectors in the UK and one is a map of all motorways in the UK. I
>>>> have successfully merged them by putting them both as polygons. However,
>>>> when I fill in the sectors with different colours the road map disappears.
>>>> The same happens when I use the same shapefile in other software.
>>>>
>>>>
>>>>
>>>> Is it possible to merge them so that the roads are always on top? Any
>>>> Help with this matter would be greatly appreciated.
>>>>
>>>> Many Thanks,
>>>> Tom
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> [image: Environment]
>>>>    ------------------------------
>>>>
>>>> Zenith Insurance Management UK Limited is an appointed service provider
>>>> to Zenith Insurance plc and is not an Agent of Zenith Insurance plc. Zenith
>>>> and Link are the European brands of the Markerstudy Group of Companies.
>>>>
>>>> Zenith Insurance Management UK Limited (Registered No. 5309111). Link
>>>> Underwriting Agency Limited (Registered No. 4227586). Both companies are
>>>> registered in England & Wales at Chester House, Harlands Road, Haywards
>>>> Heath, West Sussex, RH16 1LR. Zenith Insurance Management UK Limited is
>>>> authorised and regulated by the Financial Conduct Authority (No. 429279).
>>>> For security and training purposes, all calls may be monitored or recorded.
>>>>
>>>> Any views of opinions expressed in this e-mail are solely those of the
>>>> author and do not necessarily represent those of the Markerstudy Group of
>>>> Companies. This message (and any attachments) contains information that may
>>>> be confidential and protected from disclosure. If you are not the intended
>>>> recipient of this message or any parts of it, please immediately contact
>>>> the sender and delete the message from your system. No other person is
>>>> authorised to copy, forward, distribute, disseminate or retain this message
>>>> in any form.
>>>>  ------------------------------
>>>>
>>>> This email message has been scanned for viruses by Mimecast.
>>>> Mimecast delivers a complete managed email solution from a single web
>>>> based platform.
>>>> For more information please visit http://www.mimecast.com
>>>>  ------------------------------
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>
>>>
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>
>
> --
> tolennon at gmail.com
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150623/b63c47df/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.jpg
Type: image/jpeg
Size: 3553 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150623/b63c47df/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.gif
Type: image/gif
Size: 1725 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150623/b63c47df/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 11455 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150623/b63c47df/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 12835 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150623/b63c47df/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.jpg
Type: image/jpeg
Size: 2212 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150623/b63c47df/attachment-0003.jpg>


More information about the Qgis-user mailing list