AW: [udig-devel] Shapefiles, marks and zoom

Schneider, Michael michaelms.schneider at siemens.com
Mon Nov 6 02:06:41 PST 2006


Jesse,
 
thank you for the quick replies to my questions and for the sld file.
The only diff in your file to the one I was using is the path to the
image. As the problems appear even when not using a sld file at all, but
when using the Simple style in the style editor I think that I have
problems with the dbf file which must be there using shapefiles.
 
As mentioned before I create the shp and shx by my program. The ESRI
documentation about shapefiles does not say much about the dBase file.
Therefore I used and modified an existing dbf file (which I got together
with another shapefile).
 
Using uDIG with a shapefile, index file, and dbf file from another
source no such problems occur.
So I think this is not a problem of the sld file, but with my dbf file.
(Does anybody know more about how that file has to look like?)
 
But why does this only happen at a certain scale: Zooming in the marks
disappear at a certain scale, zooming out, they reappear exactly when
crossing the same scale?
Perhaps I should have a closer look to org.geotools.
 
Cheers
  Michael

________________________________

Von: udig-devel-bounces at lists.refractions.net
[mailto:udig-devel-bounces at lists.refractions.net] Im Auftrag von Jesse
Eichar
Gesendet: Freitag, 3. November 2006 18:33
An: User-friendly Desktop Internet GIS
Betreff: Re: [udig-devel] Shapefiles, marks and zoom


Use my SLD as a template and let me know if you still have problems.  I
tried it out and it seems to be working.   


Jesse


On 3-Nov-06, at 6:07 AM, Schneider, Michael wrote:


	Hi again,
	 
	in addition to my mail some hours ago I found that I also have
problems when using sld:Mark (see my earlier mail) or when I do not use
any sld file at all:
	  The marks disappear when zooming in to a certain amount.
	 
	This is part of the sld file I'm using, so that should not be
the reason:
	
<sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator
>
	
	The scale when the marks disappear is not always the same for a
certain set of marks. One time all marks disappear when zooming in
deeper than 1:2 Mio., another time they disappear not before zooming in
to 1:750000.
	 
	I also noticed that the marks disappear during panning when
because of panning the zoom reaches the above mentioned value.
	 
	All that happens even when I only have 1 mark.
	 
	I did not see anything about that in the shapefile specs. I
specify a bounding box with x and y set, but z and M (measure) set to 0.
And ZoomToLayer works fine for the shapefile layer.
	 
	Is there anything to pay attention at with respect to the dbf
file? What else might be wrong with me?
	 
	Any hints welcome, cheers
	  Michael
	 
	
	 
________________________________

	Von: udig-devel-bounces at lists.refractions.net
[mailto:udig-devel-bounces at lists.refractions.net] Im Auftrag von
Schneider, Michael
	Gesendet: Freitag, 3. November 2006 10:31
	An: User-friendly Desktop Internet GIS
	Betreff: [udig-devel] Shapefiles and sld:ExternalGraphic
	
	

	Hi, 

	I'm using uDIG 1.1 RC4 and in my program I create a shapefile of
type MultiPoint (shape type 8). Using this shapefile with uDIG works
fine as long as I use a sld file with sld:Mark: All of my about 50
points are shown.

	But when I try to use a sld file with sld:ExternalGraphic only 1
of those is shown although more than 1 are in the range of the viewport.
When that one currently shown is not in the viewport anymore (because of
panning or zooming in) another one is shown. But as I said always only 1
at a time is displayed.

	Here are the diffs of the two sld files: 

	Vergleichen von (<)D:\Projekte\uDIG\data\pin.sld (2310l Byte) 
	 mit (>)D:\Projekte\uDIG\data\hits.sld (3959l Byte) 

	25,28c25,55 
	<                             <sld:ExternalGraphic> 
	<                                 <sld:OnlineResource
xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:href="file:/D:/Projekte/uDIG/data/pin.gif"/>

	<
<sld:Format>image/gif</sld:Format> 
	<                             </sld:ExternalGraphic> 
	--- 
	>                             <sld:Mark> 
	>
<sld:WellKnownName>x</sld:WellKnownName> 
	>                                 <sld:Fill> 
	>                                     <sld:CssParameter
name="fill"> 
	>
<ogc:Literal>#FF0000</ogc:Literal> 
	>                                     </sld:CssParameter> 
	>                                     <sld:CssParameter
name="fill-opacity"> 
	>
<ogc:Literal>0.75</ogc:Literal> 
	>                                     </sld:CssParameter> 
	>                                 </sld:Fill> 
	>                                 <sld:Stroke> 
	>                                     <sld:CssParameter
name="stroke"> 
	>
<ogc:Literal>#000000</ogc:Literal> 
	>                                     </sld:CssParameter> 
	>                                     <sld:CssParameter
name="stroke-linecap"> 
	>
<ogc:Literal>butt</ogc:Literal> 
	>                                     </sld:CssParameter> 
	>                                     <sld:CssParameter
name="stroke-linejoin"> 
	>
<ogc:Literal>miter</ogc:Literal> 
	>                                     </sld:CssParameter> 
	>                                     <sld:CssParameter
name="stroke-opacity"> 
	>
<ogc:Literal>1.0</ogc:Literal> 
	>                                     </sld:CssParameter> 
	>                                     <sld:CssParameter
name="stroke-width"> 
	>
<ogc:Literal>2.0</ogc:Literal> 
	>                                     </sld:CssParameter> 
	>                                     <sld:CssParameter
name="stroke-dashoffset"> 
	>
<ogc:Literal>0.0</ogc:Literal> 
	>                                     </sld:CssParameter> 
	>                                 </sld:Stroke> 
	>                             </sld:Mark> 
	33c60 
	<
<ogc:Literal>75.0</ogc:Literal> 
	--- 
	>
<ogc:Literal>20.0</ogc:Literal> 

	Any hints where I do something wrong? 

	Cheers 
	  Michael 

	_______________________________________________
	User-friendly Desktop Internet GIS (uDig)
	http://udig.refractions.net
	http://lists.refractions.net/mailman/listinfo/udig-devel
	_______________________________________________
	User-friendly Desktop Internet GIS (uDig)
	http://udig.refractions.net
	http://lists.refractions.net/mailman/listinfo/udig-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20061106/1b0c6a9b/attachment-0001.html


More information about the udig-devel mailing list