Changeset 36015 in osm for applications/editors
- Timestamp:
- 2022-08-23T20:06:58+02:00 (2 years ago)
- Location:
- applications/editors/josm/plugins/geotools
- Files:
-
- 3 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/geotools/build.xml
r35959 r36015 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <project name="geotools" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" >2 <project name="geotools" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors"> 3 3 <!-- enter the SVN commit message --> 4 4 <property name="commit.message" value="Commit message"/> … … 29 29 <!--<include name="jackson.jar"/>--> 30 30 </fileset> 31 <macrodef name="merge-text-files"> 32 <attribute name="mergefile"/> 33 <attribute name="targetdir"/> 34 <sequential> 35 <concat destfile="@{targetdir}/@{mergefile}"> 36 <restrict> 37 <rsel:name name="@{mergefile}"/> 38 <archives> 39 <zips> 40 <fileset dir="${plugin.lib.dir}" includes="*.jar" excludes="*-sources.jar, *-javadoc.jar" erroronmissingdir="no"/> 41 </zips> 42 </archives> 43 </restrict> 44 </concat> 45 </sequential> 46 </macrodef> 31 47 32 48 <target name="merge-geotools-services" depends="fetch_dependencies"> … … 40 56 </fileset> 41 57 </merge-services> 42 <echo>Check the updated files in jar/META-INF/services for lines where two 43 services got merged. Example: 44 org.geotools.coverage.util.FilterFunction_isCoverageorg.geotools.filter.AreaFunction 45 </echo> 58 <echo>Check the updated files in jar/META-INF/services for lines where two 59 services got merged. Example: 60 org.geotools.coverage.util.FilterFunction_isCoverageorg.geotools.filter.AreaFunction 61 </echo> 62 63 <merge-text-files mergefile="META-INF/javax.media.jai.registryFile.jai" targetdir="jar"/> 64 <merge-text-files mergefile="META-INF/registryFile.jai" targetdir="jar"/> 65 <merge-text-files mergefile="META-INF/registryFile.jaiext" targetdir="jar"/> 46 66 </target> 47 67 -
applications/editors/josm/plugins/geotools/jar/META-INF/registryFile.jai
r31599 r36015 1 # 2 # The registry file for Geotools Grid Coverage implementation. This file should be automatically 3 # parsed by JAI under initialization. If it is not, then Registry.registerServices(...) can parse 4 # it. This may happen if this file is unreachable from the JAI class loader. 5 # 6 # If this file is updated, remember to update Registry.registerServices(...) accordingly. 7 # 8 # Version: $Id$ 9 # 10 ################################################################################################## 11 # 12 # Each line can be in one of the formats described below. Space or tab characters separate 13 # keywords in each line. The comment character is '#'; on each line all characters following 14 # the first comment character are ignored. The file must be encoded in UTF-8. 15 # 16 # 1. To register descriptors : 17 # 18 # descriptor <descriptor-class-name> 19 # 20 # 2. To register factory objects under a product against a specific mode : 21 # 22 # <registry-mode-name> <factory-class-name> <product-name> <descriptor-name> <local-name> 23 # 24 # The <local-name> is (only) used later on in this file to set preferences 25 # between factory objects, if wanted. 26 # 27 ################################################################################################## 1 28 # 2 29 # Image operation descriptors : 3 30 # 4 descriptor org.jaitools.media.jai.contour.ContourDescriptor5 descriptor org.jaitools.media.jai.rangelookup.RangeLookupDescriptor6 descriptor org.jaitools.media.jai.vectorbinarize.VectorBinarizeDescriptor7 descriptor org.jaitools.media.jai.vectorize.VectorizeDescriptor8 descriptor org.jaitools.media.jai.zonalstats.ZonalStatsDescriptor9 31 descriptor org.geotools.image.palette.ColorReductionDescriptor 10 32 descriptor org.geotools.image.palette.ColorInversionDescriptor 33 34 # 35 # "rendered" factory objects 36 # 37 rendered org.geotools.image.palette.ColorReductionCRIF org.geotools org.geotools.ColorReduction ColorReduction 38 rendered org.geotools.image.palette.ColorInversionCRIF org.geotools org.geotools.ColorInversion ColorInversion 39 # 40 # The registry file for Geotools Grid Coverage implementation. This file should be automatically 41 # parsed by JAI under initialization. If it is not, then Registry.registerServices(...) can parse 42 # it. This may happen if this file is unreachable from the JAI class loader. 43 # 44 # If this file is updated, remember to update Registry.registerServices(...) accordingly. 45 # 46 ################################################################################################## 47 # 48 # Each line can be in one of the formats described below. Space or tab characters separate 49 # keywords in each line. The comment character is '#'; on each line all characters following 50 # the first comment character are ignored. The file must be encoded in UTF-8. 51 # 52 # 1. To register descriptors : 53 # 54 # descriptor <descriptor-class-name> 55 # 56 # 2. To register factory objects under a product against a specific mode : 57 # 58 # <registry-mode-name> <factory-class-name> <product-name> <descriptor-name> <local-name> 59 # 60 # The <local-name> is (only) used later on in this file to set preferences 61 # between factory objects, if wanted. 62 # 63 ################################################################################################## 64 # 65 # Image operation descriptors : 66 # 67 descriptor it.geosolutions.imageio.imageioimpl.imagereadmt.ImageReadDescriptorMT 11 68 12 69 … … 14 71 # "rendered" factory objects 15 72 # 16 rendered org.jaitools.media.jai.contour.ContourRIF org.jaitools.media.jai Contour Contour 17 rendered org.jaitools.media.jai.rangelookup.RangeLookupRIF org.jaitools.media.jai RangeLookup RangeLookup 18 rendered org.jaitools.media.jai.vectorbinarize.VectorBinarizeRIF org.jaitools.media.jai VectorBinarize VectorBinarize 19 rendered org.jaitools.media.jai.vectorize.VectorizeRIF org.jaitools.media.jai Vectorize Vectorize 73 rendered it.geosolutions.imageio.imageioimpl.imagereadmt.ImageReadMTCRIF it.geosolutions.imageio.imageioimpl.imagereadmt ImageReadMT ImageReadMT 74 75 # 76 # Image operation descriptors : 77 # 78 descriptor org.jaitools.media.jai.zonalstats.ZonalStatsDescriptor 79 80 81 # 82 # "rendered" factory objects 83 # 20 84 rendered org.jaitools.media.jai.zonalstats.ZonalStatsRIF org.jaitools.media.jai ZonalStats ZonalStats 21 rendered org.geotools.image.palette.ColorReductionCRIF org.geotools org.geotools.ColorReduction ColorReduction22 rendered org.geotools.image.palette.ColorInversionCRIF org.geotools org.geotools.ColorInversion ColorInversion -
applications/editors/josm/plugins/geotools/jar/META-INF/registryFile.jaiext
r31752 r36015 1 1 # 2 # Image descriptors 3 # 4 5 descriptor it.geosolutions.jaiext.affine.AffineDescriptor 6 7 # 8 # RenderedImageFactories 9 # 10 11 rendered it.geosolutions.jaiext.affine.AffineCRIF it.geosolutions.jaiext Affine Affine# 12 # Image descriptors 13 # 14 15 descriptor it.geosolutions.jaiext.algebra.AlgebraDescriptor 16 descriptor it.geosolutions.jaiext.algebra.constant.OperationConstDescriptor 17 18 # 19 # RenderedImageFactories 20 # 21 22 rendered it.geosolutions.jaiext.algebra.AlgebraCRIF it.geosolutions.jaiext algebric algebric 23 rendered it.geosolutions.jaiext.algebra.constant.OperationConstCRIF it.geosolutions.jaiext operationConst operationConst # 24 # Image descriptors 25 # 26 27 descriptor it.geosolutions.jaiext.bandcombine.BandCombineDescriptor 28 29 # 30 # RenderedImageFactories 31 # 32 33 rendered it.geosolutions.jaiext.bandcombine.BandCombineCRIF it.geosolutions.jaiext BandCombine BandCombine # 34 # Image descriptors 35 # 36 37 descriptor it.geosolutions.jaiext.bandmerge.BandMergeDescriptor 38 39 # 40 # RenderedImageFactories 41 # 42 43 rendered it.geosolutions.jaiext.bandmerge.BandMergeCRIF it.geosolutions.jaiext BandMerge BandMerge # 44 # Image descriptors 45 # 46 47 descriptor it.geosolutions.jaiext.bandselect.BandSelectDescriptor 48 49 # 50 # RenderedImageFactories 51 # 52 53 rendered it.geosolutions.jaiext.bandselect.BandSelectCRIF it.geosolutions.jaiext BandSelect BandSelect # 54 # Image descriptors 55 # 56 57 descriptor it.geosolutions.jaiext.binarize.BinarizeDescriptor 58 59 # 60 # RenderedImageFactories 61 # 62 63 rendered it.geosolutions.jaiext.binarize.BinarizeCRIF it.geosolutions.jaiext Binarize Binarize # 64 # Image descriptors 65 # 66 67 descriptor it.geosolutions.jaiext.border.BorderDescriptor 68 69 # 70 # RenderedImageFactories 71 # 72 73 rendered it.geosolutions.jaiext.border.BorderRIF it.geosolutions.jaiext Border Border # 74 # Image descriptors 75 # 76 77 descriptor it.geosolutions.jaiext.buffer.BufferDescriptor 78 79 # 80 # RenderedImageFactories 81 # 82 83 rendered it.geosolutions.jaiext.buffer.BufferRIF it.geosolutions.jaiext Buffer Buffer # 84 # Image descriptors 85 # 86 87 descriptor it.geosolutions.jaiext.classifier.RasterClassifierDescriptor 88 89 # 90 # RenderedImageFactories 91 # 92 93 rendered it.geosolutions.jaiext.classifier.RasterClassifierCRIF it.geosolutions.jaiext RasterClassifier RasterClassifier# 94 # Image descriptors 95 # 96 97 descriptor it.geosolutions.jaiext.colorconvert.ColorConvertDescriptor 98 99 # 100 # RenderedImageFactories 101 # 102 103 rendered it.geosolutions.jaiext.colorconvert.ColorConvertCRIF it.geosolutions.jaiext ColorConvert ColorConvert# 104 # Image descriptors 105 # 106 107 descriptor it.geosolutions.jaiext.colorindexer.ColorIndexerDescriptor 108 109 # 110 # RenderedImageFactories 111 # 112 113 rendered it.geosolutions.jaiext.colorindexer.ColorIndexerCRIF it.geosolutions.jaiext ColorIndexer ColorIndexer # 2 114 # Image operation descriptors : 3 115 # 4 descriptor it.geosolutions.jaiext.colorconvert.ColorConvertDescriptor 116 117 descriptor it.geosolutions.jaiext.crop.CropDescriptor 118 119 120 # 121 # "rendered" factory objects 122 # 123 rendered it.geosolutions.jaiext.crop.CropCRIF it.geosolutions.jaiext Crop Crop 124 # 125 # Image descriptors 126 # 127 128 descriptor it.geosolutions.jaiext.errordiffusion.ErrorDiffusionDescriptor 129 130 # 131 # RenderedImageFactories 132 # 133 134 rendered it.geosolutions.jaiext.errordiffusion.ErrorDiffusionRIF it.geosolutions.jaiext ErrorDiffusion ErrorDiffusion# 135 # Image descriptors 136 # 137 138 descriptor it.geosolutions.jaiext.format.FormatDescriptor 139 140 # 141 # RenderedImageFactories 142 # 143 144 rendered it.geosolutions.jaiext.format.FormatCRIF it.geosolutions.jaiext Format Format # 145 # Image descriptors 146 # 147 148 descriptor it.geosolutions.jaiext.imagefunction.ImageFunctionDescriptor 149 150 # 151 # RenderedImageFactories 152 # 153 154 rendered it.geosolutions.jaiext.imagefunction.ImageFunctionRIF it.geosolutions.jaiext ImageFunction ImageFunction# 155 # Image descriptors 156 # 157 158 descriptor it.geosolutions.jaiext.lookup.LookupDescriptor 159 160 # 161 # RenderedImageFactories 162 # 163 164 rendered it.geosolutions.jaiext.lookup.LookupCRIF it.geosolutions.jaiext Lookup Lookup # 165 # Image descriptors 166 # 167 168 descriptor it.geosolutions.jaiext.mosaic.MosaicDescriptor 169 170 # 171 # RenderedImageFactories 172 # 173 174 rendered it.geosolutions.jaiext.mosaic.MosaicRIF it.geosolutions.jaiext Mosaic Mosaic # 175 # Image descriptors 176 # 177 178 descriptor it.geosolutions.jaiext.nullop.NullDescriptor 179 180 # 181 # RenderedImageFactories 182 # 183 184 rendered it.geosolutions.jaiext.nullop.NullCRIF it.geosolutions.jaiext Null Null # 185 # Image descriptors 186 # 187 188 descriptor it.geosolutions.jaiext.orderdither.OrderedDitherDescriptor 189 190 # 191 # RenderedImageFactories 192 # 193 194 rendered it.geosolutions.jaiext.orderdither.OrderedDitherRIF it.geosolutions.jaiext OrderedDither OrderedDither# 195 # Image descriptors 196 # 197 198 descriptor it.geosolutions.jaiext.piecewise.GenericPiecewiseDescriptor 199 200 # 201 # RenderedImageFactories 202 # 203 204 rendered it.geosolutions.jaiext.piecewise.GenericPiecewiseCRIF it.geosolutions.jaiext GenericPiecewise GenericPiecewise# 205 # Image descriptors 206 # 207 208 descriptor it.geosolutions.jaiext.rescale.RescaleDescriptor 209 210 # 211 # RenderedImageFactories 212 # 213 214 rendered it.geosolutions.jaiext.rescale.RescaleCRIF it.geosolutions.jaiext Rescale Rescale # 215 # Image operation descriptors : 216 # 217 descriptor it.geosolutions.jaiext.rlookup.RangeLookupDescriptor 218 219 220 # 221 # "rendered" factory objects 222 # 223 rendered it.geosolutions.jaiext.rlookup.RangeLookupRIF it.geosolutions.jaiext RLookup RLookup 224 # 225 # Image descriptors 226 # 227 228 descriptor it.geosolutions.jaiext.scale.ScaleDescriptor 229 230 # 231 # RenderedImageFactories 232 # 233 234 rendered it.geosolutions.jaiext.scale.ScaleCRIF it.geosolutions.jaiext Scale Scale # 235 # Image descriptors 236 # 237 238 descriptor it.geosolutions.jaiext.scale.Scale2Descriptor 239 240 # 241 # RenderedImageFactories 242 # 243 244 rendered it.geosolutions.jaiext.scale.Scale2CRIF it.geosolutions.jaiext Scale2 Scale2 # 245 # Image descriptors 246 # 247 248 descriptor it.geosolutions.jaiext.shadedrelief.ShadedReliefDescriptor 249 250 # 251 # RenderedImageFactories 252 # 253 254 rendered it.geosolutions.jaiext.shadedrelief.ShadedReliefRIF it.geosolutions.jaiext ShadedRelief ShadedRelief 255 # 256 # Image descriptors 257 # 258 259 descriptor it.geosolutions.jaiext.stats.StatisticsDescriptor 260 261 # 262 # RenderedImageFactories 263 # 264 265 rendered it.geosolutions.jaiext.stats.StatisticsRIF it.geosolutions.jaiext Stats Stats # 266 # Image descriptors 267 # 268 269 descriptor it.geosolutions.jaiext.translate.TranslateDescriptor 270 271 # 272 # RenderedImageFactories 273 # 274 275 rendered it.geosolutions.jaiext.translate.TranslateCRIF it.geosolutions.jaiext Translate Translate # 276 # Image operation descriptors : 277 # 278 descriptor it.geosolutions.jaiext.vectorbin.VectorBinarizeDescriptor 279 280 281 # 282 # "rendered" factory objects 283 # 284 rendered it.geosolutions.jaiext.vectorbin.VectorBinarizeRIF it.geosolutions.jaiext VectorBinarize VectorBinarize 285 # 286 # Image descriptors 287 # 288 5 289 descriptor it.geosolutions.jaiext.warp.WarpDescriptor 6 descriptor it.geosolutions.jaiext.stats.StatisticsDescriptor 290 291 # 292 # RenderedImageFactories 293 # 294 295 rendered it.geosolutions.jaiext.warp.WarpRIF it.geosolutions.jaiext Warp Warp # 296 # Image descriptors 297 # 298 7 299 descriptor it.geosolutions.jaiext.zonal.ZonalStatsDescriptor 8 300 9 301 # 10 # "rendered" factory objects 11 # 12 rendered it.geosolutions.jaiext.colorconvert.ColorConvertCRIF it.geosolutions.jaiext ColorConvert ColorConvert 13 rendered it.geosolutions.jaiext.warp.WarpRIF it.geosolutions.jaiext Warp Warp 14 rendered it.geosolutions.jaiext.stats.StatisticsRIF it.geosolutions.jaiext Stats Stats 15 rendered it.geosolutions.jaiext.zonal.ZonalStatsRIF it.geosolutions.jaiext Zonal Zonal 302 # RenderedImageFactories 303 # 304 305 rendered it.geosolutions.jaiext.zonal.ZonalStatsRIF it.geosolutions.jaiext Zonal Zonal -
applications/editors/josm/plugins/geotools/src/org/openstreetmap/josm/plugins/geotools/GeoToolsPlugin.java
r34097 r36015 12 12 import javax.media.jai.OperationRegistry; 13 13 14 import it.geosolutions.imageio.compression.CompressionRegistry; 14 15 import org.geotools.image.ImageWorker; 15 16 import org.geotools.referencing.CRS; … … 38 39 } 39 40 40 private void initJAI() {41 private static void initJAI() { 41 42 // Disable mediaLib searching that produces unwanted errors 42 43 // See https://www.java.net/node/666373 … … 50 51 // As the JAI jars are bundled in the geotools plugin, JAI initialization does not work, 51 52 // so we need to perform the tasks described here ("Initialization and automatic loading of registry objects"): 52 // https://docs.oracle.com/ /cd/E17802_01/products/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/OperationRegistry.html53 // https://docs.oracle.com/cd/E17802_01/products/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/OperationRegistry.html 53 54 OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry(); 54 55 if (registry == null) { … … 92 93 } 93 94 94 private void initGeoTools() {95 private static void initGeoTools() { 95 96 // Force Axis order. Fix #8248 96 97 // See http://docs.geotools.org/stable/userguide/library/referencing/order.html 97 98 System.setProperty("org.geotools.referencing.forceXY", "true"); 99 // Force registration of compression. Fix #22303. 100 CompressionRegistry.getDefaultInstance().registerApplicationClasspathSpis(); 98 101 } 99 102 100 private void checkEPSG() {103 private static void checkEPSG() { 101 104 try { 102 105 CRS.decode("EPSG:4326");
Note:
See TracChangeset
for help on using the changeset viewer.