Basically, I have written a icon group manager dialog where users
can create their own groups of icons which are then displayed in a tabbed pane,
on for each group, in a View at the side of the
map. So the first I know about it is when they drop the icon
onto a map.
I am
not sure if I understand exactly how an sld works yet. If there is one
sld file per shape file(?), then I guess I have to create a new one for each
layer from my code - just string write it out to a file on the drop of the first
icon of that type when I create the new layer/shapefile, with the icon path hard
coded - assuming the External Graphic can be a local file reference and not
just a web address?
Is
this my only choice? If so, I can go ahead an code for that.
>>>>> myself :-
>>
>>>>>> ( - going to get a cup of tea )
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx
>>>>>> [mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of
>>>>>> Jody
>>
>>>>>> Garnett
>>>>>> Sent: 11 March 2006 08:58
>>>>>> To: User-friendly Desktop Internet GIS
>>>>>> Subject: Re: [udig-devel] Shapefiles
>>>>>>
>>>>>>
>>>>>> You guys are working to hard, I wrote a parser method I never
>>>>>> wanted
>>>
>>>>>> to do this stuff twice.
>>>>>> - http://udig.refractions.net/docs/api-geotools/org/geotools/
>>>>>> data/
>>>>>> DataUtil
>>>>>> ities.html
>>>>>>
>>>>>> The format is silly, but it is in the javadocs:
>>>>>> - http://udig.refractions.net/docs/api-geotools/org/geotools/
>>>>>> data/
>>>>>> DataUtil
>>>>>> ities.html#createType(java.lang.String,%20java.lang.String)
>>>>>>
>>>>>> basically:
>>>>>> "name:String,age:Number,position:Point,*destination:Point"
>>>>>> Where the * indicates the default geometry ..
>>>>>>
>>>>>> Other useful stuff:
>>>>>> - http://udig.refractions.net/docs/api-geotools/org/geotools/
>>>>>> feature/
>>>>>> Featu
>>>>>> reTypes.html
>>>>>>
>>>>>> Jody
>>>>>>>
>>>>>>>
>>>>>>> M.S.Bachler wrote:
>>>>>>>>
>>>>>>>> Hi!
>>>>>>>>
>>>>>>>> Silly question.
>>>>>>>>
>>>>>>>> Earlier you helpfully gave me a code snippet to create a new
>>>>>>>> shapefile.
>>>>>>>>
>>>>>>>> IndexedShapefileDatastoreFactory fac=new
>>>>>>>> IndexedShapefileDataStoreFactory();
>>>>>>>>
>>>>>>>> ShapefileDataStore dsĂșc.createDatastore(url);
>>>>>>>>
>>>>>>>> // I assume this is the URL of the new shapefile I want it to
>>>>>>>> create?
>>>>>>>>
>>>>>>>> GeometryFactory gf = new GeometryFactory();
>>>>>>>>
>>>>>>>> ds.createSchema( featureType );
>>>>>>>>
>>>>>>>> // Here I got lost. Started to investigate FeatureType and felt
>>>>>>>> like I was walking through tar.
>>>>>>>>
>>>>>>> I did some stuff with FeatureType the other day... trying to
>>>>>>> create
>>>
>>>>>>> a new Feature from scratch. Here is the code I found to create a
>>>>>>> new
>>>>>>> FeatureType:
>>>>>>> AttributeType geomAttr >>>>>> AttributeTypeFactory.newAttributeType("the_geom",
>>>>>> LineString.class);
>>>>>>> FeatureType ftRoad >>>>>> FeatureTypeBuilder.newFeatureType(new AttributeType[] {geomAttr},
>>>>>> "road");
>>>>>>>
>>>>>>> // WKTReader wktReader = new WKTReader();
>>>>>>> // Point geometry = (Point) wktReader.read
>>>>>>> ("POINT
>>>>>> (" + lat + " " + lon + ")");
>>>>>>> GeometryFactory geomFactory = new
>>>>>> GeometryFactory();
>>>>>>> LineString geometry >>>>>> geomFactory.createLineString(coords);
>>>>>>> Feature theRoad = ftRoad.create(new Object[]
>>>>>>> {geometry}, "myRoad");
>>>>>>>
>>>>>>>
>>>>>>> This example Feature only has one attribute which is the
>>>>>>> geometry,
>>
>>>>>>> the_geom. You can create and add other attributes in the
>>>>>>> AttributType[] and Object[] if needed.
>>>>>>>
>>>>>>> These classes are from the org.geotools.feature package.
>>>>>>>
>>>>>>> Hopefully you may find this useful. I'm not sure if this is the
>>>>>>> most
>>>>
>>>>>>> up-to-date way of doing it, but it worked for me.
>>>>>>>
>>>>>>> Mark
>>>>>>>
>>>>>>> --
>>>>>>> This message has been scanned for viruses and dangerous
>>>>>>> content by
>>>>>>> *MailScanner* , and is believed
>>>>>>> to be
>>>
>>>>>>> clean. _______________________________________________
>>>>>>> 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
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>> _______________________________________________
>>>> 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
>>> _______________________________________________
>>> 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
>> _______________________________________________
>> 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
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
|