shapefile with antimeridian polygons

classic Classic list List threaded Threaded
1 message Options
ShaderMan ShaderMan
Reply | Threaded
Open this post in threaded view
|

shapefile with antimeridian polygons

Hello,

I'm having trouble with displaying polygons crossing the antimeridian in a shapefile

I'm using this code in the earth file :

	<model name="testAntime" driver="feature_geom" visible="true">	
		<cache_policy usage="no_cache"/>
	
		<features name="testAntimed" driver="ogr">
			<url>testAntimeridian_error.shp</url>	
		</features>	
		<feature_indexing enabled="false"/>
		<styles>
			<style type="text/css">
				testAntimeri_style{				
				stroke: #00ffff;
				fill: #ff00ff80;
				stroke-width: 1;

			}
			</style>

		</styles>
	</model>

shapefile_error.zip



in this shapefile, i have several polygons: two of them can have their longitude cross the antimeridian > +180°,they are displayed as long as their barycenter/centroid stays <180° .
However if their "center" is > 180° they do not display  and they also mess withthe display of the ones within the regular extent (-180->+180)
Same phenomenon appear when a polygon is described with a single longitude < -180 ° .


I stumbled upon this thread:
Antimeridian-polygon

the behavior seems different when using WKT to describe the boundaries:
antimeridian_errors.earth

Is there a way to describe an antimeridian polygon in a shapefile without splitting it in 2 pieces ?
(we'd like to avoid the splitting because we need a half transparent fill on them)

Thanks,

ShaderMan