Jump to content

dummzeuch

Members
  • Content Count

    2637
  • Joined

  • Last visited

  • Days Won

    91

Everything posted by dummzeuch

  1. I've got picutres (airial photos) in jpeg2000 format (filename.jp2) with embedded GML (Geographic Markup Language) information giving their geographic position. I need to use this with a tool that can only handle JPEG files with additional world files (filename.jpg + filename.jpw). I already have got a conversion tool for jpeg2000 to jpeg (Yes, I know that jpeg2000 is lossless while jpeg isn't, but that doesn't matter in this context.) but it does not handle the gml information. I need to do two things; extract the GML text interpret this text in the same way as a world file Eventually this should result in a program that reads those .jp2 files and generates .jpw files for each of them. Before I reinvent the wheel: Is there already a tool that can do that (in batch mode!)? If not: Extracting the GML can be done by simply parsing the start of the file until it encounters the matching strings. Not elegant but it would work. I'd prefer a library that can do this according to specification though. I tried to understand the GML specification, but so far failed. It's very complex and apparently can do a lot more than I need. A world file contains 6 lines of text: Line 1: A: pixel size in the x-direction in map units/pixel Line 2: D: rotation about y-axis Line 3: B: rotation about x-axis Line 4: E: pixel size in the y-direction in map units, almost always negative[3] Line 5: C: x-coordinate of the center of the upper left pixel Line 6: F: y-coordinate of the center of the upper left pixel I'm not sure how to get this from the GML information: <gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlJP2Profile/1.0.0/gmlJP2Profile.xsd"> <gml:boundedBy> <gml:Envelope srsName="urn:ogc:def:crs:EPSG::25832"> <gml:lowerCorner>319000 5629000</gml:lowerCorner> <gml:upperCorner>320000 5630000</gml:upperCorner> </gml:Envelope> </gml:boundedBy> <gml:featureMember> <gml:FeatureCollection> <gml:featureMember> <gml:RectifiedGridCoverage dimension="2" gml:id="RGC0001"> <gml:rectifiedGridDomain> <gml:RectifiedGrid dimension="2"> <gml:limits> <gml:GridEnvelope> <gml:low>0 0</gml:low> <gml:high>9999 9999</gml:high> </gml:GridEnvelope> </gml:limits> <gml:axisName>x</gml:axisName> <gml:axisName>y</gml:axisName> <gml:origin> <gml:Point gml:id="P0001" srsName="urn:ogc:def:crs:EPSG::25832"> <gml:pos>319000.05 5629999.95</gml:pos> </gml:Point> </gml:origin> <gml:offsetVector srsName="urn:ogc:def:crs:EPSG::25832">0.1 0</gml:offsetVector> <gml:offsetVector srsName="urn:ogc:def:crs:EPSG::25832">0 -0.1</gml:offsetVector> </gml:RectifiedGrid> </gml:rectifiedGridDomain> <gml:rangeSet> <gml:File> <gml:rangeParameters/> <gml:fileName>gmljp2://codestream/0</gml:fileName> <gml:fileStructure>Record Interleaved</gml:fileStructure> </gml:File> </gml:rangeSet> </gml:RectifiedGridCoverage> </gml:featureMember> </gml:FeatureCollection> </gml:featureMember> </gml:FeatureCollection> gml:lowerCorner and gml:upperConer seem to be the coordinates of the top left and bottom right of the picture in UTM zone 32N, that should take care of lines 5 and 6 of the world file. Pixels sizes don't seem to be part of the data. I could probably assume a rotation of for these kinds of pictures. So maybe I could simply compute the pixels sizes from the picture size and the given coordinates?
  2. Thanks a lot. I was expecting the reason for this functionlity to fail to be a compiler / map file incompatibility but didn't know if I was right. This will solve it for Win64, but probably not for the other target platforms because they use yet another compiler.
  3. dummzeuch

    Deal - breaker: Registration Limit Increase

    No, it used to be like that (Delphi 2007), but embarcadero changed this a while ago.
  4. dummzeuch

    Improvements in Uses Clause Manager Identifier Search

    As long as I use a slow computer myself that's important to me. It's not that I could not afford a faster one, I chose not to throw away anything just because something "better" comes around. You would be surprised how many Downloads of the Delphi 6 (and 7) version there still are. Personally I never used Delphi 6 but went from Delphi 5 directly to Delphi 7, so there is no nostalgia involved. I keep Delphi 6 support around because it's not much effort to keep it on top of Delphi 7 support (which is even more "popular" than Delphi 6). If I were to drop support for any Delphi versions, I would drop everything below Delphi 2007. That will happen if I ever lose my installations of these older versions, they stop working because of e.g. a Windows update or some bug turns up that only exists in these versions and that I am unable to fix with reasonable effort. (Or if I just decide I'm fed up with it.) For me GExperts is not about "business value". Otherwise I would definitely do something else in my spare time.
  5. dummzeuch

    class constructor - Backport to D2007.

    Make the class constructor a regular procedure, the class variable a variable inside the unit and call the procedure from initialization.
  6. You may need a license to use Google Maps, while Open Street Map is free, you can even host your own map server. Also, I would rather trust in OSM than Google that they keep their service available and the APIs mostly unchanged. (Just remember why this forum exists. G+ anybody?)
  7. dummzeuch

    Parse and Log method parameters

    I wonder whether the string types also have a .toTtring method(helper). That would make writing such a tool so much simpler.
  8. dummzeuch

    Improvements in Uses Clause Manager Identifier Search

    Just to let you know: The improvements compiled with minimal changes in Delphi 6. No, as I wrote: I tested it on two computers, one is an 8 core Intel, the other one a 6 core AMD. Both are much faster than the average computer used in our company. But I also keep a Samsung N10 Netbook with Windows XP around to test for performance issues. Delphi 2007 and most of the GExperts functionality works fine on that one. But since the new functionality is already annoyingly slow on my fast computers, I haven't checked on the netbook yet. Talking about annoyances: You have the habit of upper casing words in a sentence. This comes over to many as shouting which is impolite. But answering the question: I prefer to solve performance issues in a way that also profits people with slower computers. After all, the above mentioned netbook is the one I take with me when I'm on vacation. One option to improve performance would be to use ContainsStr rather ContainsText. This would require the list to be converted to upper (or lower) case for searching, but since it would annoy me to show the identifiers converted thus, it means to have a converted copy of the list for searching and another one with the original identifiers. I just committed GX_UnitExportList (plus unit tests) which I consider using as a the solution. Another option would be to create an index as an array['a'..'z', '_', ' '] of TList which points to all entries that contain a given character (' ' for "any other character", we can have non ASCII characters in identifiers after all, but I guess they are rare). So the search could only include those entries that are in the list of all characters the user has typed. But it takes time to generate that array which may make the cure worse than the disease. I'll have to do some timing here.
  9. dummzeuch

    Improvements in Uses Clause Manager Identifier Search

    @PeterPanettone I have been testing the new functionality and I like it. One thing I that I would change (and probably will when I find th time) is to always show the matches at the start first even in "match anywhere" mode. This might also solve the small performance problem in that mode, because it's noticably slower than "Match at start" even on my very fast computer. So searching for matches at the start could be done first and displayed immediately, searching for matches anywhere else could be moved to a background thread and appended to the list once that thread finishes. Thinking about this: After that change there would be no need to distinguish between those modes...
  10. dummzeuch

    Improvements in Uses Clause Manager Identifier Search

    I just had a short look at the sources: They don't compile with Delphi 2007 because you prefixed many identifiers with the full unit names, e.g. Vcl.Controls.whatever. Delphi < XE does not understand this, so please don't do that. Also, there are quite a few unknown properties, but there isn't much that you can do about this. If I get it to compile I'll commit this, so you can base any additional changes on the changed code. Edit: Done.
  11. dummzeuch

    Improvements in Uses Clause Manager Identifier Search

    Delphi 6 (and Delphi 2007) does not have any enhanced threading library, so TParallelFor is out. I hope the rest of your changes hasn't broken too many places. (Mind you, I'm not complaining, I'm glad that somebody shows so much enthusiasm and contributes to GExperts, but as long as it can be done without too much hassle, I want to continue supporting Delphi 6 and 7. And Delphi 2007 is a must as long as I'm stuck with it.)
  12. dummzeuch

    Uses Clause Manager in Tree in r2809

    No, it's the combination of the project's search path and the library path. Basically everything the IDE knows about.
  13. dummzeuch

    Uses Clause Manager in Tree in r2809

    May I remind you that adding suggestions to the sf.net ticketing system increases your chances of gettimg them implemented?
  14. dummzeuch

    Uses Clause Manager in Tree in r2809

    I should have looked closer at the rfindunit results: There is no identifier that starts with newshortcut, its only part of a word. The uses clause manager searches only for identifiers that start with the given search text. So, maybe it should also search for identifiers that contain in anywhere. As for using rfindunit sources: I looked into it a while ago and found only one advantage: It extracts identifiers from the dcu files when no sources are available. This turns into a drawback when the dcu format changes (which it will). I definitely won't invest the time for reverse engineering the dcu format whenever it changes.
  15. dummzeuch

    Uses Clause Manager in Tree in r2809

    By default, the uses manager only looks for identifiers only in the favorite units. If that is empty, you won't get any. In the settings you can tell it to search all units instead.
  16. dummzeuch

    optset files

    For the first time ever I just looked into the option set functionality of the project options dialog: There are Apply and Save buttons for each section and each configuration that read / write .optset files which are in XML format and contain the settings to be changed at some configuration level. This seems very complicated to me, so I wonder whether anybody actually uses it, and if yes, for what and how ?
  17. Some long standing bugs in the GExperts code formatter have been fixed. It’s great to see nearly all unit tests finally succeed. About 10 new test cases have been added too, so the improvement is significant. The fixed bugs including some that have bugged (sorry 😉 ) me for years, ... [read on in the blog post]
  18. dummzeuch

    GExperts Replace Components..

    The issue as reported to Embarcadero happens with a newly created plugin that uses some small code part copied from GExperts. It's reproducible as described there.
  19. GExperts can do the latter, but not automatically for a whole project, only for the uses clause of the current unit.
  20. dummzeuch

    Interesting article about dying languages

    I have enabled a notification service for new job offers containing the keyword "Delphi" in Germany from a popular IT magazine. I get about one notification per week. About half of them contain "Delphi" as part of the requirements also listing other programming languages like C#, JavaScript and C++, where it isn't clear what the main language - if there is one - is (it could be maintaining legacy Delphi sources and an ongoing effort of porting to another languages, but that's not clear and since I have never atually asked I don't know). The other half is mostly database centered, about half of these list a recent Delphi version (10.x) the others don't say anything about the version. But some even mention mobile development together with Delphi so at least some new development is going on with current Delphi versions. I don't get notifications on other job offers but I doubt that they are as low as for Delphi for anything but maybe COBOL. Of course that's only a small sample: It is for Germany only It is only from one source In particular it does not include jobs that are offered by "word of mouth", which in the Delphi area seems to be a majority here.
  21. dummzeuch

    wtf is TForm.Action for?

    Can somebody explain to me what TForm.Action is for? And how it can be used? The OLH is here, but it does not specifically talk about TForm: http://docwiki.embarcadero.com/Libraries/Rio/en/Vcl.Forms.TForm.Action It refers to an example http://docwiki.embarcadero.com/CodeExamples/Rio/en/TFormAction_(Delphi) which I also don't understand. From the example I gather that TForm.Action is not assigned by default, but when and by which mechanism is it executed? It's not that I need it, I just came across this property for the first time (it has existed for over a decade).
  22. dummzeuch

    wtf is TForm.Action for?

    I'm not questioning the advantages of actions in general, just that of an action property in TForm. I still haven't understood what that particular one can be used for.
  23. dummzeuch

    wtf is TForm.Action for?

    So, the Action is executed when the user clicks on the form?
  24. dummzeuch

    place of "mark site read" Button

    Make the browser window narrower and it disappears altogether. Then you have to use the menu. Not really an improvement.
  25. dummzeuch

    PopMenu two levels down..

    "Diesmal funktioniert alles" The last line from "Computer sind doof" by Spliff I don't think there is an English translation of the lyrics or sub titles for this song, sorry. It basically tells about lots of things going wrong when using computers (actually embedded microprocessors, what nowadays would part of the "Internet of things"). Mostly just annoyances. The last part then describes a sequence of computer failure events that leads to the death of Leonid Breschnew and him causing a nuclear war. The last sentence then is "This time everything works."
×