Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Loading a Udig project programatically and retrievingLayers

Mario Nuñez Jimenez wrote:
Hello you all,
I have been loading a Udig project from my application,
I have been dealing with shapefile paths and wms urls in order to get it loaded at project loading but it seems that udig project file map.unmap has some encoded references. I don't know how deal with them, I have to update those references on loading in order to load from local path, my three layers references looks like:



catalogRef="%23Tue+Oct+21+17%3A28%3A59+CEST+2008%0D%0A%2Fnet.refractions.udig.project%2Fhttp%253A%252F%252Fwms.jpl.nasa.gov%252Fwms.cgi%253FService%253DWMS%2526Version%253D1.1.1%2526Request%253DGetCapabilities%2523BMNG%2Fhttp%253A%252F%252Fwms.jpl.nasa.gov%252Fwms.cgi%253FService%253DWMS%2526Version%253D1.1.1%2526Request%253DGetCapabilities%2Fnet.refractions.udig.catalog.internal.wms.WMSServiceImpl.WMS_URL_KEY%2Ftype%3Djava.net.URL%0D%0Afile_export_version%3D3.0%0D%0A%2Fnet.refractions.udig.project%2Fhttp%253A%252F%252Fwms.jpl.nasa.gov%252Fwms.cgi%253FService%253DWMS%2526Version%253D1.1.1%2526Request%253DGetCapabilities%2523BMNG%2Fhttp%253A%252F%252Fwms.jpl.nasa.gov%252Fwms.cgi%253FService%253DWMS%2526Version%253D1.1.1%2526Request%253DGetCapabilities%2Fnet.refractions.udig.catalog.internal.wms.WMSServiceImpl.WMS_URL_KEY%2Fvalue%3Dhttp%253A%252F%252Fwms.jpl.nasa.gov%252Fwms.cgi%253FService%253DWMS%2526Version%253D1.1.1%2526Request%253DGetCapabilities%0D%0A%5C%21%2Fnet.refra
ctions.udig.project%2Fhttp%253A%252F%252Fwms.jpl.nasa.gov%252Fwms.cgi%253FService%253DWMS%2526Version%253D1.1.1%2526Request%253DGetCapabilities%2523BMNG%3D%0D%0A"



catalogRef="%23Tue+Oct+21+17%3A28%3A59+CEST+2008%0D%0Afile_export_version%3D3.0%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2523thai_south_counties%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2Fshapefile%5C+url%2Ftype%3Djava.net.URL%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2523thai_south_counties%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2Fshapefile%5C+url%2Fvalue%3Dfile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%25
2FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2523thai_south_counties%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2Fdbf%5C+charset%2Fvalue%3Dwindows-1252%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2523thai_south_counties%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2Fcreate%5C+spatial%5C+index%2Ftype%3Djava.lang.Boolean%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2523thai_south_counties%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2Fcreate%5C+spatial%
5C+index%2Fvalue%3Dtrue%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2523thai_south_counties%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2Fdbf%5C+charset%2Ftype%3Djava.lang.String%0D%0A%5C%21%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSouth%2BCounties%2B%2528FIPS%2529%252Fthai_south_counties.shp%2523thai_south_counties%3D%0D%0A"


catalogRef="%23Tue+Oct+21+17%3A28%3A59+CEST+2008%0D%0Afile_export_version%3D3.0%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2523thai_states_fips_area%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2Fdbf%5C+charset%2Ftype%3Djava.lang.String%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2523thai_states_fips_area%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2Fshapefile%5C+url%2Fvalue%3Dfile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%0D%0A%5C%21%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BSt
ates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2523thai_states_fips_area%3D%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2523thai_states_fips_area%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2Fcreate%5C+spatial%5C+index%2Fvalue%3Dtrue%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2523thai_states_fips_area%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2Fcreate%5C+spatial%5C+index%2Ftype%3Djava.lang.Boolean%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2523thai_states_fips_area%2Ffile%253A%252FD%25
3A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2Fshapefile%5C+url%2Ftype%3Djava.net.URL%0D%0A%2Fnet.refractions.udig.project%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2523thai_states_fips_area%2Ffile%253A%252FD%253A%252Fshapefiles%252FThailand%252FThailand%2BStates%2B%2528FIPS%2529%252Fthai_states_fips_area.shp%2Fdbf%5C+charset%2Fvalue%3Dwindows-1252%0D%0A"




May be URLEncoder and URLDecoder solve my problems?

I think so. That's what I do in a similar context:

String decodedValue = URLDecoder.decode(stringValue, "UTF-8");

Cheers,

Ugo

Thank you in advance
Kind regards
Mario.
------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. Este mensaje y los ficheros adjuntos pueden contener informacion confidencial destinada solamente a la(s) persona(s) mencionadas anteriormente pueden estar protegidos por secreto profesional. Si usted recibe este correo electronico por error, gracias por informar inmediatamente al remitente y destruir el mensaje. Al no estar asegurada la integridad de este mensaje sobre la red, Atos Origin no se hace responsable por su contenido. Su contenido no constituye ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas partes. Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor no puede garantizar nada al respecto y no sera responsable de cualesquiera danos que puedan resultar de una transmision de virus. ------------------------------------------------------------------

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





--
Ugo Taddei

Fraunhofer Institut Intelligente Analyse- und Informationssysteme (FhG IAIS)
http://www.iais.fraunhofer.de
Department Knowledge Discovery - IAIS.KD -
Working Group Spatial Decision Support
http://www.iais.fraunhofer.de/kd.html
phone  (+49)2241-14-2184    fax    (+49)2241-14-2072
Schloss Birlinghoven, D-53754 Sankt Augustin, Germany


Back to the top