Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Consider a region (2D) filled with lines randomly (following Figure). We are interested in filling the empty spaces between lines including four boundary edges in a way:

0- maximizing the size of parcels;
1- shape of filling parcels is square aligned horizontally or vertically;
2- shape of filling parcels is square, i.e., relaxed alignment;
3- shape of filling parcels is any quadrangle. our original question

So for now there are three different scenarios.
Note that the lines are of the form [x1,y1,x2,y2] point set, real numbers.

[* * *] Ideas of possible solutions/algorithms/code snippets/etc are more than welcome.

enter image description here


Update 1: We could manage a solution for the first case:
enter image description here
Steps are:
1- lines
2- rasterizing lines into a bitmap
3- searching nearby cells for each cell of desired color (i.e., the same color) with an objective function to maximize the area i.e., the number of cells.

It works well however it covers only the first scenario and it is also slow.


Update 2:
We assumed that the reader is familiar with the concept of space-filling-tiling. You may follow the link for inspiration. However note that our problem is different. As we do not fill the empty space randomly and we do not chose the size randomly. The solution should be iterative. For all the cases, there is no limit on the number of parcel being fitted. Indeed, it is up to user to limit the iteration number, by choosing a minimum area for parcels, for example. This is obvious in the example given above in which we discretized lines into pixels with specified size. That is, the procedure should run until entire empty area is filled respecting the criterion e.g., the maximum area of parcels.


Update 3:
summary:
One application is to find out the distribution of extractable intact 'rock' blocks in a heavily fractured 'mine'. This could be very helpful for many aspects including drilling design, financial evaluation etc.
description:
For a mine of decorative rock (stone) the products which are the blocks of intact rocks cut as rectangular cubes the price is closely dependent to the size of the block. Extraction of a block from a suitable area i.e., with no major fracture will be desired if the amount of remaining parts is small as possible. Usually, the small pieces of rocks have no economic value relatively and are considered so as waste.
The question in this post investigates solutions for this kind of problem.

A mathematical view for the problem can be stated as follows:
2D: Find all rectangles that could be extracted from a given 2D region with some lines optimized for larger rectangle size as possible.
3D: Find all rectangular cubes that could be extracted from a given 3D region with some sub-planes (better: polygons) optimized for larger block size as possible.


Since this is part of an on-going research, some of the questions asked in the comments below do not have certain answers that we can provide. We believe that the provided information here so far is indeed enough to get the overall picture of the problem. Nevertheless, we provide some details as we can for community benefits.
You may put some restrictions on the solution for the ultimate question, although, we believe it is always possible to add more later. For example, follow these: {2D case}
The best size of a block (economically optimum rectangle) to be extracted under the conditions mentioned above, is 1x1 m given 10x10 m for the region in the example. This is one constraint defined based on economical value. The minimum workable size for cutting etc, let be 0.15x0.15 m; so this the second size limit.
enter image description here
The figure above shows the economic value function depending to the block size. So for this particular case every rock piece smaller than 0.15x0.15 m is just waste. There will be no block size larger than 1.7x1.7 m due to operation limits.

share|improve this question
Your question will not have a definitive answer and is therefore not a good fit for the StackExchange format. Please add additional criteria on what an ideal/good solution would be for you. That way people would know what to optimize for when they'll answer your question. Otherwise it'd just be a suggestion box. – R.K. Nov 21 '12 at 12:01
2  
@R.K. - I disagree. S/he has already stated what they're looking for very clearly. Sure there are multiple possible solutions but there's nothing to stop them all being useful and voted up. – GIS-Jonathan Nov 21 '12 at 12:55
As this is an algorithmy question that may be quite math heavy, you might want to try - math.stackexchange.com – GIS-Jonathan Nov 21 '12 at 12:56
1  
Closely related: gis.stackexchange.com/questions/27303. The present question, as @R.K. notes, has no definite answer because it is not sufficiently well posed. How many rectangles are allowed? What does it mean to "maximize size"? Note, too, that this is not a "random tiling" problem: the lines merely determine, via their complement, the areas that can be occupied; the solutions will definitely not be random. Note, too, that an easy simplification is immediately available: the problem can be solved separately within each component of the complement. – whuber Nov 21 '12 at 15:08
1  
As @whuber suggests, this is not really a GIS question (though I'm not offended that it's asked here.) You'll have much better luck getting an answer in a forum for computational geometry or optimization. – Llaves Mar 4 at 0:10
show 9 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.