code: public void clipTile(InternalTile tile, double scale, Coordinate panOrigin) throws GeomajasException {
  		log.debug("clipTile before {}", tile);
  		List<InternalFeature> orgFeatures = tile.getFeatures();
  		tile.setFeatures(new ArrayList<InternalFeature>());
  		Geometry maxScreenBbox = null; // The tile's maximum bounds in screen space. Used for clipping.
  		for (InternalFeature feature : orgFeatures) {
  			// clip feature if necessary
  			if (exceedsScreenDimensions(feature, scale)) {
  				log.debug("feature {} exceeds screen dimensions", feature);
  				InternalFeatureImpl vectorFeature = (InternalFeatureImpl) feature.clone();
  				tile.setClipped(true);
  				vectorFeature.setClipped(true);
  				if (null == maxScreenBbox) {
  					maxScreenBbox = JTS.toGeometry(getMaxScreenEnvelope(tile, panOrigin));
  				}
  				Geometry clipped = maxScreenBbox.intersection(feature.getGeometry());
  				vectorFeature.setClippedGeometry(clipped);
  				tile.addFeature(vectorFeature);
  			} else {
  				tile.addFeature(feature);
  			}
  		}
  		log.debug("clipTile after {}", tile);
  	}
docs: Apply clipping to the features in a tile. The tile and its features should already be in map space.
  
  @param tile
  tile to put features in
  @param scale
  scale
  @param panOrigin
  When panning on the client, only this parameter changes. So we need to be aware of it as we calculate
  the maxScreenEnvelope.
  @throws GeomajasException oops