Check tile transitive groups.

@param resolved The resolved tiles.
@param tile The tile to check.
354037
private void checkTransitives(Collection<Tile> resolved, Tile tile)
    {
        boolean isTransitive = false;
        for (final Tile neighbor : map.getNeighbors(tile))
        {
            final String group = mapGroup.getGroup(tile);
            final String neighborGroup = mapGroup.getGroup(neighbor);
            final Collection<GroupTransition> transitives = getTransitives(group, neighborGroup);

            if (transitives.size() > 1 && (getTransition(neighbor, group) == null || isCenter(neighbor)))
            {
                final int iterations = transitives.size() - 3;
                int i = 0;
                for (final GroupTransition transitive : transitives)
                {
                    updateTransitive(resolved, tile, neighbor, transitive);
                    isTransitive = true;
                    i++;
                    if (i > iterations)
                    {
                        break;
                    }
                }
            }
        }
        // Restore initial tile once transition solved by transitive
        if (isTransitive)
        {
            map.setTile(tile);
        }
    }
1233505
public void accept(PainterVisitor visitor, Object group, Bbox bounds, boolean recursive) {
		if (googleMap == null) {
			// create as first child of raster group
			map.getRasterContext().drawGroup(null, this);
			String id = map.getRasterContext().getId(this);
			String graphicsId = map.getVectorContext().getId();

			googleMap = createGoogleMap(id, graphicsId, type.name(), showMap, getVerticalMargin(),
					getHorizontalMargin(), getVerticalAlignmentString());
		}
	}
79896
public Transition getTransition(Tile tile)
    {
        final Collection<String> neighborGroups = getNeighborGroups(tile);
        final Collection<String> groups = new HashSet<>(neighborGroups);

        final Transition transition;
        if (groups.size() == 1 && mapGroup.getGroup(tile).equals(groups.iterator().next()))
        {
            transition = getTransitionSingleGroup(groups);
        }
        else if (groups.size() == 2 && neighborGroups.size() == TransitionType.BITS && isTransition(tile))
        {
            transition = getTransitionTwoGroups(neighborGroups);
        }
        else
        {
            transition = null;
        }

        return transition;
    }
487777
protected void fillTile (
        Graphics2D gfx, int tx, int ty, Color color)
    {
        Composite ocomp = gfx.getComposite();
        gfx.setComposite(ALPHA_FILL_TILE);
        Polygon poly = MisoUtil.getTilePolygon(_metrics, tx, ty);
        gfx.setColor(color);
        gfx.fill(poly);
        gfx.setComposite(ocomp);
    }
1169896
protected function assertIndexesAreValidForTile($row, $column, Tile $tile)
    {
        return $this->assertIndexesAreValid($row, $column, $tile->height, $tile->width);
    }
1273210
private void checkGroup(Entry<Point, Set<Collidable>> current)
    {
        final Set<Collidable> elements = current.getValue();
        for (final Collidable objectA : elements)
        {
            checkOthers(objectA, current);
        }
    }
99388
@Override
    public STRATEGYSTAGETYPE resolve(String... coordinates) throws IllegalArgumentException, ResolutionException {
        return delegate.resolve(coordinates);
    }
402835
public static void getTile (int width, int height, int tileWidth, int tileHeight, int tileIndex,
                                Rectangle bounds)
    {
        // figure out from whence to crop the tile
        int tilesPerRow = width / tileWidth;

        // if we got a bogus region, return bogus tile bounds
        if (tilesPerRow == 0) {
            bounds.setBounds(0, 0, width, height);

        } else {
            int row = tileIndex / tilesPerRow;
            int col = tileIndex % tilesPerRow;
            // crop the tile-sized image chunk from the full image
            bounds.setBounds(tileWidth*col, tileHeight*row, tileWidth, tileHeight);
        }
    }
180234
public void setTileFormat(TileFormatType tileFormat) {
		if (tileFormat == null) {
			tileFormat = TileFormatType.STANDARD;
		} else {
			switch (tileFormat) {
			case STANDARD:
			case TMS:
				this.tileFormat = tileFormat;
				break;
			default:
				throw new GeoPackageException(
						"Unsupported Tile Format Type for URL Tile Generation: "
								+ tileFormat);
			}
		}
	}
757427
public void ignoreTileDao(TileDao tileDao) {

        GeoPackageOverlay tileOverlay = new GeoPackageOverlay(tileDao);
        linkedOverlays.add(tileOverlay);
    }
223236
private void addTileCollisions(MapTileCollision mapCollision, TileCollision tileCollision, Tile tile)
    {
        final TileRef ref = new TileRef(tile);
        for (final CollisionGroup collision : mapCollision.getCollisionGroups())
        {
            final Collection<TileRef> group = mapGroup.getGroup(collision.getName());
            if (group.contains(ref))
            {
                for (final CollisionFormula formula : collision.getFormulas())
                {
                    tileCollision.addCollisionFormula(formula);
                }
            }
        }
    }
293601
private void doGroupCheck() {
        if (!hasTabs()) return;

        for (String groupName : getGroupNames()) {
            String tabName = getGroupedAttribtes(groupName).get(0).getTabName();
            for (PropertyBinding propBinding : getGroupedAttribtes(groupName)) {
                if (!tabName.equals(propBinding.getTabName())) {
                    throw new RuntimeException("FormItem " + propBinding.getJavaName() + " must be on the same tab with all members of its subgroup.");
                }
            }
        }
    }
417264
private void solution(BitSet traversed) {
        boolean included = false;
        BitSet projG1 = projectG1(traversed);
        BitSet projG2 = projectG2(traversed);

        // the solution must follows the search constrains
        // (must contain the mandatory elements in G1 an G2)
        if (isContainedIn(c1, projG1) && isContainedIn(c2, projG2)) {
            // the solution should not be included in a previous solution
            // at the RGraph level. So we check against all previous solution
            // On the other hand if a previous solution is included in the
            // new one, the previous solution is removed.
            for (Iterator<BitSet> i = solutionList.listIterator(); i.hasNext() && !included;) {
                BitSet sol = i.next();

                if (!sol.equals(traversed)) {
                    // if we asked to save all 'mappings' then keep this mapping
                    if (findAllMap && (projG1.equals(projectG1(sol)) || projG2.equals(projectG2(sol)))) {
                        // do nothing
                    }
                    // if the new solution is included mark it as included
                    else if (isContainedIn(projG1, projectG1(sol)) || isContainedIn(projG2, projectG2(sol))) {
                        included = true;
                    }
                    // if the previous solution is contained in the new one, remove the previous solution
                    else if (isContainedIn(projectG1(sol), projG1) || isContainedIn(projectG2(sol), projG2)) {
                        i.remove();
                    }
                } else {
                    // solution already exists
                    included = true;
                }
            }

            if (included == false) {
                // if it is really a new solution add it to the
                // list of current solution
                solutionList.add(traversed);
            }

            if (!findAllStructure) {
                // if we need only one solution
                // stop the search process
                // (e.g. substructure search)
                stop = true;
            }
        }
    }
329589
private static Tile searchForTile(MapTile map, ImageBuffer tileSprite, int x, int y)
    {
        // Check each tile on each sheet
        for (final Integer sheet : map.getSheets())
        {
            final Tile tile = checkTile(map, tileSprite, sheet, x, y);
            if (tile != null)
            {
                return tile;
            }
        }

        // No tile found
        return null;
    }
1170212
public static boolean check(Tile tile1, Tile tile2, Tile tile3, Tile tile4) {
        return tile1 == tile2 && tile2 == tile3 && tile3 == tile4;
    }
716992
private void checkOthers(Collidable objectA, Entry<Point, Set<Collidable>> current)
    {
        for (final Integer acceptedGroup : objectA.getAccepted())
        {
            // Others to compare only in accepted group
            if (collidables.containsKey(acceptedGroup))
            {
                checkOthers(objectA, current, acceptedGroup);
            }
        }
    }
1305694
private boolean isTileVisible(final ReferencedEnvelope tileBounds) {
        if (FloatingPointUtil.equals(this.transformer.getRotation(), 0.0)) {
            return true;
        }

        final GeometryFactory gfac = new GeometryFactory();
        final Optional<Geometry> rotatedMapBounds = getRotatedMapBounds(gfac);

        if (rotatedMapBounds.isPresent()) {
            return rotatedMapBounds.get().intersects(gfac.toGeometry(tileBounds));
        } else {
            // in case of an error, we simply load the tile
            return true;
        }
    }