I want to split a polygon by a intersecting line into different parts, exactly like in this post(Split a polygon layer with a line layer?).
I have a vector grid to cut the polygons, so I used the intersect tool(vector grid with polygons) first, to get the lines from the vector grid intersecting the polygons I want to cut.
Afterwards I followed the procedure like in the post mentioned above (union and then polygonize), but it does not provide a feasible solution, because some layers are cut as I want it and others are not.
Does anyone has any workaround about it? I read here (Making polygon from intersecting lines in QGIS using Polygonize or similar? ) that there have been some problems with polygonize, maybe this is the reason?
FYI: I am running Windows 8, 64 bit, QGIS Desktop 2.4, and installed it by the downloaded file.
Thanks for your answers!
I'd suggest to poligonize the grid and to then intersect the polygon grid with the other input polygon layer. That should be much less trouble.
How to split Polygons by line grid? - Geographic Information Systems
Designers of location algorithms share test data sets (benchmarks) to be able to compare performance of newly developed algorithms. In previous decades, the availability of locational data was limited. Big data has revolutionised the amount and detail of information available about human activities and the environment. It is expected that integration of big data into location analysis will increase the resolution and precision of input data. Consequently, the size of solved problems will significantly increase the demand on the development of algorithms that will be able to solve such problems. Accessibility of realistic large scale test data sets, with the number of demands points above 100,000, is very limited. The presented data set covers entire area of Slovakia and consists of the graph of the road network and almost 700,000 connected demand points. The population of 5.5 million inhabitants is allocated to the locations of demand points considering the residential population grid to estimate the size of the demand. The resolution of demand point locations is 100 m. With this article the test data is made publicly available to enable other researches to investigate their algorithms. The second area of its utilisation is the design of methods to eliminate aggregation errors that are usually present when considering location problems of such size. The data set is related to two research articles: “A Versatile Adaptive Aggregation Framework for Spatially Large Discrete Location-Allocation Problem” (Cebecauer and Buzna, 2017)  and “Effects of demand estimates on the evaluation and optimality of service centre locations” (Cebecauer et al., 2016) .
We would like to split the area into smaller bounding boxes which could them be used for obtaining data by calling WMS/WCS requests. The package implements 3 different ways of splitting the area.
Splitting the bounding box¶
The most straight forward approach is to calculate the area bounding box and split it into smaller parts of equal size.
As an input we need to provide a list of geometries, their CRS, and int or tuple specifying to how many parts bounding box will be split.
Besides the list of bounding boxes it is also possible to get a list of geometries (i.e. intersection of each bounding box with entire area of interest).
In order to visualize the splits let’s use the following function
Splitter automatically removed the bounding boxes that did not intersect with the geometry of Hawaii Islands. However the majority of the area inside bounding boxes is still outside our geometry. Therefore each splitter has also an optional parameter reduce_bbox_sizes .
By specifying finer splitting we could even further reduce the total area of bounding boxes.
Splitting in OSM grid¶
Sometimes it is better to have a splitting grid independent from the given geometries. That way if the geometries at some point slightly change the grid will stay the same.
The following splitter implements Open Street Map’s grid.
Splitting in satellite’s tile grid¶
If we would like to work on a level of satellite tiles and split them we can use the TileSplitter . It works in combination with Sentinel Hub WFS service therefore an instance ID is required, as described in instruction. We also need to specify time_interval and data_collection .
TileSplitter by default returns bounding boxes in the satellite tile CRS. In order to transform them we can use BBox.transform(target_crs) method or by specifying crs parameter in get_bbox_list method.
Note: This will only transform bounding box vertices and therefore the new bounding box will not be completely aligned with the original one.
Obtained Sentinel-2 tiles intersect each other. Therefore this splitter is only useful if we are analyzing data on level of original satellite tiles.
We can also specify to further split the satellite tiles.
Splitting in custom grid¶
In case none of the above splitters suffices there is also a CustomGridSplitter . All we need is a list of bounding boxes, which define a new way of splitting the area.
The following example is just a split into bounding boxes with integer value latitude and longitude:
Note that polygons, which are outside of the given collection of bounding boxes, will not affect the tiling.
Just like in previous examples we can further split each of the bounding boxes and reduce their size to better fit given shapes.
Splitting into UTM grid zones¶
When dealing with large areas such as countries or continents spanning multiple UTM zones, it might be convenient to split the area according to UTM zones or to the UTM Military Grid Reference System. For these use-cases, a UtmZoneSplitter and a UtmGridSplitter have been created. These splitters will generate a list of bounding boxes in UTM CRS. Each BBox will have the CRS corresponding to the UTM zone it belongs to.
To ensure consistency across zones and grid tiles, the size of the BBox es in metres is specified as input parameter. For this reason, the option reduce_bbox_sizes is not available for these splitters. The two splitters return consistent results between each other, with the exceptions of areas where the UTM grid tiles present exceptions, as in 31V and 32V , and 31X , 33X , 35X and 37X .
3. Review of PLC Systems
PLC systems have been used in electricity grids for over a century. PLC technology offers the inherent relationship with the underlying grid in such a way that circumstances related to performance and availability can be associated to grid events. PLC, as explained in the next sections, refers to different variations of the same communications concept. Making a good combination of the different PLC technologies in the various segments of the grid, a PLC-based Smart Metering deployment may be arranged, so as to easily evolve towards a Smart Grid infrastructure.
3.1. Evolution of PLC Technology and Systems
The origins of PLC technology date at least back to 1918 in Japan, as  states in relation with the first test and commercial operation of PLC for voice telephony over power lines. PLC ideas were even generated earlier at the end of the 19th century, with certain patents claiming voice and data transport over any type of wired media including power lines. Few years later, the first experiments were carried out with this flourishing technology in the USA, Europe and Asia , in such a way that by 1927 PLC had been widely adopted . The first implementations of PLC were intended for long distance applications in HV power lines (high power transmissions around 50 W and tens of kilometers covered using frequencies from 50 kHz to 300 kHz ), where regular telephone lines were performing worse than PLC due to the weakness of the poles used, and the interferences among power and telephony lines that often occurred (economic aspects may also be mentioned). These initial voice communications evolved to include low-speed data transmission, including the evolution to highly efficient digital communications for operational services  and the recent knowledge transfer from the BB PLC for access and in-home progresses [27,28].
However, PLC applications for meter reading (1897 as per , and 1903 as per ) were even earlier than voice applications. After the massive adoption by electricity utilities of long distance PLC transmission over HV lines, it was in 1930 , and more consistently in the 1950s when a group of companies  developed a PLC system for central load management, with the objective to control load peaks in the grid. These systems are the PLC systems known as “ripple control”, and apart from the fact that some of them still survive in our days, they have the privilege to have continued the non-voice application uses of PLC technology, thus being the predecessors of Smart Metering and Smart Grid solutions.
Ultra-Narrowband (UNB) PLC. These systems work in either Ultra Low Frequency (0.3–3 kHz) or in the Super Low Frequency (30–300 Hz). “Ripple control” systems can be considered a historical example of this group of PLC technologies, even if these ripple control systems were one-way communications. These UNB systems convey very low data rates (roughly 100 bps) at tens or even one hundred kilometers.
Narrowband (NB) PLC. These systems use the frequency band from 3 kHz to 500 kHz that include the European Committee for Electrotechnical Standardization (CENELEC) A band (Europe, 3–148.5 kHz), the Federal Communications Commission (FCC) band (USA, 10–490 kHz), ARIB band (Japan, 10–450 kHz) and Chinese band (3–500 kHz). These technologies have a range that depending on the power lines can reach from hundreds of meters to some kilometers. NB PLC technologies can be further classified as: ○
Low Data Rate (LDR) NB PLC. Single carrier technologies capable transmitting a few kbps
High Data Rate (HDR) NB PLC. Multicarrier technologies capable transmitting hundreds of kbps.
BB PLC. These systems operate in bands from 1.8 MHz to 250 MHz, covering distances from hundreds of meters to kilometers, and providing data rates from several Mbps to hundreds of Mbps.
Narrowband PLC systems evolution (UNB and NB): ○
Ripple control systems were the first example of ‘demand side management’ in the middle of the 20th century. It used unidirectional UNB PLC, managing to couple the PLC signal from the MV to the LV, and reaching certain loads that could be disconnected from the grid, managing to reduce the consumption, and thus the peak load curve. These systems were enhanced to include some basic tariff-based meter adjustment, as a very basic seed of Smart Metering systems.
First Smart Metering systems were initially implemented also with UNB PLC. They are still used in some cases where meters are dispersed over broad geographical areas, and very limited non-PLC technological alternatives exist. In the last 20 years, two-way automatic communications system (TWACS) [33,34] and Turtle Systems  have spread their deployments, and have faced the criticism of the very limited scope of the functionalities that can be implemented in the Smart Metering domain with such low data rates.
The settlement of the Smart Metering concepts came in the 1990s with the advent of the EN50065 regulation (specifically in Europe). The upper part of the CENELEC A band is the common factor that has de-facto been reserved worldwide for PLC applications. Many proprietary systems were developed in the early part of this period using NB PLC. Some of them evolved to standard status, and some of them remained proprietary. And some others were standardized, but never produced any field-deployed system with a sufficient scale. Among these systems we can mention American National Standards Institute (ANSI)/Electronic Industries Alliance (EIA) 709.1 (LonWorks, becoming ISO/International Electrotechnical Commission (IEC) 14908-1 in 2008), IEC 613334-5 parts, and specific vendor solutions (ON Semiconductor, STMicroelectronics, Yitran and Adaptive Networks among others, offering LDR NB PLC solutions, with data rates ranging from 1200 bps to 4800 bps). One of the “concepts” developed in this period was the application layer that these systems used, and the object model it managed (Device Language Message Specification (DLMS) and COmpanion Specification for Energy Metering (COSEM), respectively ).
Smart Metering systems, projecting themselves into the Smart Grid domain have been a reality with the development and massive deployment start of HDR NB PLC systems. Since the early attempts of HDR NB PLC systems with orthogonal frequency division multiplexing (OFDM) , inheriting the concepts of the multi-carrier modulation (MCM) of IEC 61334-5-4, it was not until PoweRline Intelligent Metering Evolution (PRIME) and G3 system definition crystalized that Smart Metering PLC systems could find a route to orientate the industry efforts towards non-proprietary, feasible, interoperable and field-proven solutions that were prepared for the needs of a Smart Grid. These systems were deeply analyzed by Open Meter project  (as a consequence of mandates M/441  and M/490 ) and projected into the Institute of Electrical and Electronics Engineers (IEEE) 1901.2 and International Telecommunication Union (ITU) standardization roadmaps. These HDR NB PLC systems are able to support demand management programs, distribution automation systems, outage management, reduction of energy usage, decrease of network losses and local balancing. These applications do need technologies that are prepared to support their requirements, but the basic communications technology alone does not provide such functionalities ).
Early implementations of BB PLC systems came in 1997 with the first tests for residential Internet access in UK with Norweb Communications and Nortel . The products used were prepared to transmit data rates around 1 Mbps, that for the time they were intended were close to alternative commercial offers (e.g., Asymmetric Digital Subscriber Line (ADSL)). Very short time later, companies like Ascom and Main.net actively convinced utilities all over the world to engage with trials of different scope and scale to provide Internet access to their customers, within the context of the “communications bubble” of the 2000s.
The non-stoppable evolution of DSL technologies, together with the consolidated HFC alternatives made Internet access interest vanish, even if projects like Open PLC European Research Alliance (OPERA) [41,42] led most of the research and development (R&D) initiatives around BB PLC for the access segment.
BB PLC interest was reoriented for a segment that could complement the BB Internet access penetration, and many initiatives (Homeplug , Universal Powerline Association (UPA) , HD-PLC Alliance  and HomeGrid Forum ) developed solutions to provide BB PLC connectivity. Standardization bodies consolidated these developments in the form of standards for in-home, both in IEEE 1901  and ITU G.hn .
However, the interest of utilities on BB PLC did not vanish with the Internet access deception. OPERA 2  managed to re-orient the know-how gathered in BB PLC in the access segments, to search for electricity operational applications of BB PLC. Thus the possibility to communicate Secondary Substations (SSs) among them through BB PLC, leveraged existing knowledge, and BB PLC products that could serve in-home environments, were adapted to produce industrial solutions that together with coupling units for MV cable connectivity, managed to provide deployable solutions for MV SS connectivity .
As a consequence, a group of state-of-the-art PLC technologies and solutions exist today. They have been developed and applied in different segments of the grid and for different purposes. Some of them are even well standardized and have the needed industry support.
3.2. Evolution of PLC Standardization
3.2.1. UNB and NB PLC Standardization
Standardization has not always been a priority in PLC systems. PLC priority has been historically to create systems that managed to work on real field conditions. Eventually, some parts of the systems were somehow promoted to standards, due to the adoption or the influence of the technology promoters. A good example of this statement were ripple control systems, that having their origin in the 1950s , were only standardized through  for receiver type testing.
NB PLC systems have also been subject to standardization efforts. In 1991, CENELEC issued the European Norm EN 50065-1+A1:2010  and although some of the existing PLC proprietary systems remained proprietary, some others followed different standardization paths.
LonWorks  (ANSI/EIA/Consumer Electronics Association (CEA) 709 and ISO/IEC 14908-1 ) is the result of the system created by Echelon  and supported by the EIA and the CEA, initially for industrial and building automation. The ANSI standard has four parts, one for network control protocol (EIA 709.1-B, 2002), and three more for different physical media (EIA 709.2 is the one for PLC).
Konnex (KNX, EN 50090), promoted by Konnex Association , was initially created for home and building automation, as an evolution to harmonize three other protocols (namely, BatiBUS Club International (BCI), European Installation Bus Association (EIBA), and European Home Systems Association (EHSA)). Konnex version in EN 50090 (), includes several communications media options, PLC among them.
The relevant examples in the IEC 61334-5 domain  are the International Standard IEC 61334-5-1 with a Spread-Frequency Shift Keying (SFSK) NB PLC system. IEC 61334-5-2 to IEC 61334-5-5 as Technical Specifications: IEC 61334-5-2 a FSK NB PLC system IEC 61334-5-3 with a Direct Sequence Spread Spectrum Adaptive Wideband (SS-AW) NB PLC IEC 61334-5-4 with a MCM with differential PSK, mainly for MV PLC and IEC 61334-5-5 with Spread Spectrum Fast Frequency Hopping (SS-FFH) NB PLC system.
A complementary standardization effort took place for NB PLC systems with the so-called (DLMS/COSEM) . The DLMS/COSEM is the application level and objects language that many smart metering systems worldwide use. DLMS/COSEM has its origins in the car-manufacturing industry in the 1970s. In 1980 an initiative called Manufacturing Automation Protocol (MAP) started to design a network standard to interconnect different electronic devices and machines in manufacturing plants . This effort produced a communications suite , that at the application layer defined a protocol known as Manufacturing Message Specification (MMS), standardized as [62,63]. MMS became a reference for utilities when the American Electric Power Research Institute (EPRI) focused its attention on it. In the first half of the nineties, some European utilities and manufacturers started working to adapt MMS to the electricity distribution grid , and this work resulted in a simplified version of the protocol, and then called Distribution Line Message Specification (DLMS). DLMS was standardized by IEC TC57 as [65,66]. In 1996, the DLMS User Association was created, and inside the smart metering context, a whole new “abstract object” model (COSEM) was created based on the German Energy Data Identification System (EDIS, ). DLMS took the definitive name of “Device Language Message Specification”, and together with COSEM addressed the overall market of utilities (not only electricity utilities), supporting non-PLC communication means.
The evolution of this second generation  standard systems follows with the introduction of OFDM systems, being PRIME and G3 the first instances to appear . As it was mentioned at the beginning of the chapter, and specifically true for PRIME, the efforts were initially focused on producing an industry supported systems, that should be demonstrated on the field, and that could eventually be standardized. ITU-T initiated in January 2010 the G.hnem working group (hnem stands for “home networking aspects of energy management”) with the objective of defining a NB PLC standard for energy management applications. In March 2010, the P1901.2 working group in IEEE, began to work on a NB PLC standard for Smart Grid Applications (LV and MV). Both ITU and IEEE have completed their standards, according to references [69,70].
3.2.2. BB PLC Standardization
The different BB PLC systems were developed and improved from the last part of the decade in the 1990s and in the first part of the decade of the 2000s. However, it was not until 2008 that the first formal standard appeared (ANSI, TIA-1113 ). This standard is mainly based on the HomePlug 1.0 specifications , one of the very first industry standards for BB PLC, with a great impact in the worldwide adoption of PLC systems for in-home environments.
However, the wider impact standards for the evolution of BB PLC systems have been prepared in IEEE and ITU. These standardization bodies inherited much of the PLC R&D of the first decade of the 21st century. An outstanding sample of R&D was the collaborative OPERA project . OPERA was a multi-year project (developed in two stages) funded by the European Community that engaged a large and relevant community of PLC stakeholders. OPERA focused both on BB PLC technology and its applications.
The IEEE 1901 Working Group was created in 2005 to develop a standard for high-speed communication (over 100 Mbps), in both in-home and access environments [73–76]. Its efforts were completed in September 2010 with the definition of two BB PLC technologies [47,77,78] (it was not possible to get to a consensus on one single implementation) together with a mandatory coexistence mechanism allowing IEEE 1901 devices to coexist among them and with other BB PLC standards ( i.e. , ITU G.hn).
The ITU-T G.hn Home Networking framework was established in 2006 to develop a recommendation for an in-home transceiver capable of operating over different types of in-home physical media (<1 Gbps [73,76,79]). Recommendation G.9960  (PHY (PHYsical) layer) was issued in October 2009 and Recommendation G.9961  (Data Link Layer) in June 2010. These recommendations do not target access applications.
- your table (which code you provide) is small enough that can fit on one page, so there is no need to use longtable :)
- maybe you will expand it later . in this case the following mwe can serve as framework
- i slightly modify your table code. in this i employ packages booktabs (for horizontal rules) and makecell (for multi line cells)
Here it is, simplified and improved by the loading of makecell (allows for line breaks in standard cells and a common formatting) and of booktabs (variable width horizontal lines with some padding). I added some spacing around the rows for clarity and a better readability.
I added some text to introduce the second part of the table on the next page but, as I don't speak portuguese, I'm sorry I couldn't translate it.
0. Introduction - LUPMISManual
LUPMIS is the Land Use Planning and Management Information System .
Since 2008, a spatial planning concept has been developed, defined and established at the Town and Country Planning Department (TCPD) of the Government of Ghana (2012 to be legalized), under the umbrella of the Land Administration Project.
TCPD is the sole governmental agency for spatial planning at all levels (national, regional, district). Spatial planning is understood as space-related (location-referenced, map-based, including a strong GIS component). Other agencies are in charge of economic, policy and development planning.
This Manual has 5 components:
Chapters 1-6 are a software manual for the GIS software (Map Maker) applied for the spatial planning, as part of the capacity building and planning concept.
Chapter 7 describes the planning concept.
Chapter 8 explains the customization of the GIS and specific software developed for the needs of spatial planning by TCPD in Ghana (LUPMIS Tools).
Chapter 9 shows plans and databases.
Annexes document all technical aspects of software and data standards, which a part of this established information system.
Target is the introduction and support of IT technologies into the newly introduced planning schemes for urban planning in Ghana. LUPMIS will work primarily as a decision-support tool for planning and decision making.
Criteria for its development were:
Appropriateness in its technology
Simplicity and ease of use
Compatibility with other databases
This GIS User Manual is addressed to users, both land use planners and GIS staff to perform all tasks of land use planning, as far as it can be performed with GIS. Being a draft, it will be updated frequently. The official document resides on the lt Land Administration Project's websiteAs a training manual, it is based on needs for land use planning in Ghana and on experiences of many months training of future GIS staff and land use planners.
LUPMIS-GIS runs with the GIS software Map Maker. All aspects of technology transfer, i.e. control of the system by in-house human resources, are assured. Capacity building is seen as the key to development, including - and here in particular - in the field of ICT.
A theoretical introduction into GIS is documented at the 'GIS Introduction for LUPMIS'.
Disclaimer: Any reference to this Manual or quote of requires prior approval of the Project (see contact email address below). The Project is not taking any responsibility or guarantee for functionality of explained processes and models, and external links. The original design ( 'concept' ) can be viewed at a separate website
We appreciate any suggestions .
2 Answers 2
Just pipe the command into a while loop. There are a number of nuances to this, but basically (in bash or any POSIX shell):
The other main gotcha with this (other than the IFS stuff below) is when you try to use variables from inside the loop once it has finished. This is because the loop is actually executed in a sub-shell (just another shell process) which you can't access variables from (also it finishes when the loop does, at which point the variables are completely gone. To get around this, you can do:
Hauke's example of setting lastpipe in bash is another solution.
To make sure you are processing the output of the command 'as it happens', you can use stdbuf to set the process' stdout to be line buffered.
This will configure the process to write one line at a time into the pipe instead of internally buffering its output into blocks. Beware that the program can change this setting itself internally. A similar effect can be achieved with unbuffer (part of expect ) or script .
stdbuf is available on GNU and FreeBSD systems, it only affects the stdio buffering and only works for non-setuid, non-setgid applications that are dynamically linked (as it uses a LD_PRELOAD trick).
Part 2: Data Munging in Python
To stay closer to the ‘command line’ style I’m going to do this with the Python REPL but of course a Jupyter Notebook/Lab session would be great.
We are going to use the GeoPandas library as well as Pandas for some general data manipulation:
First let’s read in the constituency polygon boundaries for Great Britain into a GeoDataFrame:
If you want to check the geometry more visually we can import matplotlib and then simply call .plot() on the GeoDataFrame:
I noticed in later plots the Shetlands were missing from the map, I think there’s an error in the CODE field in this data: S1400005 should be S14000051 . So let’s quickly change that now.
Now load in the constituency boundaries for Northern Ireland:
We want to concatenate the two sets of boundaries together into one DataFrame. To do this, I first need to adjust the column names so that they match:
Secondly, as we found in the previous tutorial, the GB and NI boundary geometry are provided in different co-ordinate systems. The Great Britain (GB) boundary file data is already projected onto the British National Grid (EPSG:27700). However the geometry data in the Northern Ireland (NI) boundaries are defined in EPSG:4326. Instead of reaching for ogr2ogr we can use GeoPandas to do this conversion:
And now we should be ready to concatenate the two sets of geometry using pd.concat , which should deliver another GeoDataFrame .
To comment lines 2 through 4 of bla.conf:
To make the command that you wanted, just put the above into a shell script called comment:
This script is used the same as yours with the exception that the first and last lines are to be separated by a comma rather than a dash. For example:
An uncomment command can be created analogously.
sed 's line selection is quite powerful. In addition to specifying first and last lines by number, it is also possible to specify them by a regex. So, if you want to command all lines from the one containing foo to the one containing bar , use:
BSD (OSX) Systems
With BSD sed, the -i option needs an argument even if it is just an empty string. Thus, for example, replace the top command above with:
How do I plumb an outside line to a roof deck faucet?
I want to get water from the first floor up along the outside of the wall (with a parapet and projecting coping) to the second floor.
I got this working as follows: 1st floor hose bibb -> 4:1 hose adapter -> Garden hose-mpt adapter->mpt-sharkbite 90 degree elbow -> 14 foot run of 1/2" PEX that goes through a 45 degree curve (now vertical), and then goes in rounded manner over the parapet wall (supported only at the top, and over to a Sharkbite->MPT(Female) ->hose bibb attached to the deck railing.
Works fine, but PEX degrades in sunlight, so this isn't a long-term solution. I'm concerned that the copper is heavier than the PEX and will put a lot of weight on the 4-1 hose adapter, and since the pipe is 6+ inches off the wall (thanks to the parapet), it isn't easy to support it.
What can I replace this with -- soft copper coil? Hard pipe with sharkbite fittings? PVC (. )
How do I support this from the top (I'd rather not drill holes in my wall)?