Esri Shape-File to Geo-Spatial Image Search

Dear All
I am developing a c# desktop application in which user have to provide a Shape-File for geo-spatial image search. I have a back-end database in SQL server 2012 in which I am saving metadata of each image, that also includes lat/ long of corner point of each
image. Now the user will provide its shape-file from the desktop application and it will searches SQL database geo-spatial images repository to fetch all images that comes inside provided shape-file. Ad I am new to SQL spatial data handling feature and just
read about STIntersection method available through which this task can be performed.
The main problem that I am facing is that how can handle shape-file passing from front end application in SQL to make a query that will check each geo-spatial images that whether it comes inside shape-file or not?
I have also a KML file of each image, will I have to make a shape file of each image and store them in database and then query STIntersection to check whether the shape-files overlap/ intercept each other or not?
Thanks in Advance
Engr. Mudassar Ali Software Engineer

ok thats nice. I have meta data of my geo-spacial images in sql database. i will get the corner points(latt/long) from there and use the following query to check whether it resides in provided shapefile of not
DECLARE @g geography;
DECLARE @h geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
SET @h = geography::STGeomFromText('POLYGON(-122.360 47.656, -122.343 47.656,-122.348 47.658, -122.358 47.658, -122.358 47.653)', 4326);SELECT CASE @g.STIntersects(@h)WHEN 1 THEN '@g intersects @h'ELSE '@g does not intersect @h'END;Now the problem is this how can I get lat/long from Esri Shape-file and pass them to this SQL query to check each image?
Engr. Mudassar Ali Software Engineer

Similar Messages

  • ESRI SHAPE FILES

    I would be pleasently surprized if someone out there knows
    how to run a "program" which
    converts a ESRI "SHAPE" file into a "SWF" file.
    If this could be done, I could store "SWF" files on my MX7
    server and use my database
    to point to what ever a user selects.
    Of course, this may not be possible, but it sure would be
    cool. Feasible ???

    > I would be pleasently surprized if someone out there
    knows how to run a
    > "program" which
    > converts a ESRI "SHAPE" file into a "SWF" file.
    VanPool,
    Try MapPublisher from Avenza:
    http://www.avenza.com/products.mapub.html
    You would also need an intermediary program like FreeHand or
    Illustrator,
    but it can be done.
    -John

  • Import a shape file to oracle spatial format within an oracle pl/sql proced

    hi,
    My task is to import an esri sde shape file to oracle sdo format within pl/sql procedure.
    i am using oracle 10g, arcgis 9 and arcsdo, geometry type is line, please anyone could help how can i achieve this task, would be very thankful
    Best Regards,

    There are no "in database" tools around that do this AFAIK. Most/all tools are external to the database and have to be invoked externally.
    If you created an external "batch file" that did the right processing, you would still have to work out how to execute this batch file from within Oracle. AFAIK the standard method is to use create custom code that uses DBMS_PIPE to communicate with the operating system to execute the batch file. DBAs hate this approach and it does require programming.
    The other method could be to write a trivial piece of Java that when passed the full path to the batch file executes the file. You would then load the compiled Java class into the Oracle JVM and then create a simple PL/SQL wrapper around it. I can't do it at the moment, but can come back with the code and instructions later on in the week.
    <SHAMELESS PLUG>
    As an aside (it seems appropriate to mention this now), I have been developing tools that do run inside the Oracle JVM an can export Oracle data (including sdo_geometry) to a number of formats:
    * xSV (ie comma separated, tab separated, any other single character)
    * Excel Spreadsheet
    * ESRI Shapefile (including the writing of the PRJ file using a user supplied PRJ string and also I write a MapInfo TAB file to "wrap" the shapefile).
    When exporting to xSV or Excel Spreadsheet one can chose to encode the SDO_GEOMETRY data as GML or WKT.
    (I am working on a KML exporter as well.)
    However, note that these tools EXPORT data and do not IMPORT data.
    The tools, currently are running in production at a customer site (tabbed shapefile export option) and work well. Export jobs are defined and given to the Oracle JOB or SCHEDULER and correctly run at the appropriate time writing the data to an operating system directory defined internally (with appropriate permissions) as an Oracle Directory object.
    I am now considering selling the exporter tool and am looking for testers. (The pricing of these tools will be exceedingly low.)
    </SHAMELESS PLUG>
    Now, while I hadn't planned to write any importer for a shapefile for my Exporter, I might consider it if you get stuck and can't find a satisfactory tool.
    regards
    Simon

  • Problem in importing data from shape file to Oracle Spatial

    The following error is being displayed
    symbol : constructor ShapefileReaderJGeom(java.lang.String)
    location: class oracle.spatial.util.ShapefileReaderJGeom
    Though i have downloaded latest Spatial Java class library (sdo_java_040319.zip) file and properly set sdoapi.jar and sdoutl.jar in the classpath.
    How can i get rid of this problem. Is it because i am still using old spatial java library for some other programs.

    Hi,
    Did you follow the instructions in the readme? Are you using Oracle10g?
    Thanks,
    Dan

  • Spatial Tables to Shape Files

    Can someone tell me how I can create shape files from spatial tables. I see a lot of examples for the reverse, but not for create shape files from spatial tables. The federal government has requested this, so I'm kind of stuck. Thanks.

    Hi Tomek,
    I am new to Oracle spatial and ESRI. I have read conversion to and from ESRI shape file. What I need to do is to convert Oracle spatial coordinate to ESRI coordinate and output ESRI coordinate to external third party software.
    I have registered ESRI to Oracle as below:
    INSERT INTO SDO_COORD_REF_SYSTEM
    SRID, COORD_REF_SYS_NAME, COORD_REF_SYS_KIND,
    COORD_SYS_ID, DATUM_ID, GEOG_CRS_DATUM_ID,
    SOURCE_GEOG_SRID, PROJECTION_CONV_ID, CMPD_HORIZ_SRID,
    CMPD_VERT_SRID, INFORMATION_SOURCE,
    DATA_SOURCE, IS_LEGACY,
    LEGACY_CODE,
    LEGACY_WKTEXT,
    LEGACY_CS_BOUNDS,
    IS_VALID,
    SUPPORTS_SDO_GEOMETRY
    VALUES
    1000000, 'USGS Albers Conical Equal Area NAD83', 'PROJECTED',
    4400, NULL, 10076,
    2000006 , NULL, NULL,
    NULL, 'USGS',
    NULL, 'TRUE',
    NULL,
    'PROJCS["Equal-Area Projection (United States)",
    GEOGCS[ "NAD 83", DATUM ["NAD 83",
    SPHEROID ["GRS 80",6378137,298.2572221010002]],
    PRIMEM ["Greenwich",0], UNIT["Decimal degree",0.0174532925199433]],
    PROJECTION ["Albers Conical Equal Area"],
    PARAMETER ["Standard_Parallel_1",29.5],
    PARAMETER ["Standard_Parallel_2",45.5], PARAMETER ["Latitude_of_Origin",23],
    PARAMETER ["Central_Meridian",-96], UNIT ["Meter",1]]',
    NULL,
    'TRUE',
    'TRUE'
    I ran the following:
    select MDSYS.SDO_CS.TRANSFORM(
    MDSYS.SDO_GEOMETRY(2001,
    82473,
    MDSYS.SDO_POINT_TYPE(2510416,
    2413881,NULL
    NULL,NULL
    1000000
    ) from dual
    The output is:
    (-14497847,5126972)
    Is the output in valid ESRI coordinate?
    How do you do the conversion otherwise?
    Please advise,
    Thanks,
    Regards,
    Michael

  • Can Oracle Spatial read shape files?

    Hi,
    I need to read some shape files into Oracle spatial and was wondering how (or indeed if) there is a way of doing this. I don't know much about the shape files, except that they can be used with ARCView. Any help would be greatly appreciated.
    Thanks
    Steve

    Steve,
    I've done this 4 ways:
    1. If you have ArcGIS 8.1, you can use ESRI's shp2sde which can create spatial tables containing SDO_GEOMETRY objects.
    2. If you have GeoMedia Pro 4.0, you can convert shape files to Oracle Spatial tables containing SDO_GEOMETRY objects either with a direct write or you can generate scripts.
    3. FME Universal Translator by Safe Software (www.safe.com) can translate shape files to Oracle Spatial tables containing SDO_GEOMETRY objects.
    4. Oracle's shp2sdo utility can also translate them, but there is added cleanup. You have to then migrate your table to 8.1.7.
    Hope that helps.
    Dave

  • Customised file explorer window for Geo-tagged images

    Dear All,
    I am really stuck on this issue. Did lots of searching but reached nowhere.
    I want to launch a file explorer window which displays only geo-tagged images(can be .jpg,.tiff,.gif) in the form of thumbnails. On selecting any of the images, the latitude adn longitude information is extracted from the image. I have found a few helpful links on the latter part(extracting the EXIF data location coordinates) but have no idea about the first part(thumbnailing geo-tagged images in explorer window). Can anyone provide useful links, references or code?

    Thanks a lot for that link. I am sorry to be asking this but i have run into problems regarding extracting the latitude longitude information from geotagged images using java. Are the same kind of tags always used in all images for storing latitude/longitude values in the EXIF data? I understand i have to use ImageIO but what tag should i exactly look for while parsing the metadata tree and how? Please provide some related links regarding this.

  • Reading shape file and searching by file type

    I want to write an application for working with ESRI .shp files which I think shouldn't be too hard. Looking for recources on this forum I didn't find any at all, which is unusual to me.
    It made me wonder the following: Why can't I search for resources on ni.com by file type? I see a lot of applications that interact in some way with existing file types (beyond ordinary xls, doc and txt), but information (be it articles, links or forum questions) are spread out all over the web (if the information exists at all). I would love to see recources grouped by file type, so I can see in a list of extensions which types people program for(in labview). Maybe there's allready something like this that I am not aware of?

    We don't have a way to search content by file type. And since most attachments are zipped up by NI or by customers, searching for a filetype probably wouldn't yield the results you were looking for.
    If an article (or customer question) makes a reference to that filetype in the text itself, or includes a link to such a file, the file extension will be indexed.
    I don't see any content relating to ".shp" files, so I would recommend simply posting your request to the appropriate product category in the Forums.
    Best of luck with the application.
    -Carrie Hooper
    National Instruments
    Web Support & Operations

  • Oracle spatial to shape file

    hi everyone
    How to convert oracle spatial data to shape file
    pls share your thoughts

    Howdy,
    fdo2fdo - http://sl-king.com/fdo2fdo/download/download.html
    Lots of conversion options, free and open source.
    r,
    dennis
    Edited by: djonio on Sep 14, 2011 1:16 PM

  • View a shape file (ArcView-Esri) in J2ME

    I 've made a project to view a map (use data from ArcView- Esri ) . But i don't know how to read data from a shape file (ArcView-Esri) and draw it into the Display . Can someone tell me how to ???
    Thanks in advandce .
    [email protected]

    Please help me ! It's very important to me !!!!

  • Parsing error in file C:\Program Files (x86)\HP\Digital Imaging\bin\hpqscloc\1033.xml

    The HP Solution Centre has disappeared from my toolbar and we I attempt to open it with the program file I receive the above error

    Hi ... I have the same kind of error message:
    Parsing error in file C:\Program Files (x86)\HP\Digital Imaging\bin\hpqscloc\1033.xml
    Have been searching for a solution, using different sort of key words, no luck so far.
    Anyone here? Many thanks in advance.

  • Create a spatail table using a shape file (.shp) in SQL DB

    Hi All,
    I am trying to load shape file into a sql spatial table. A execution process task is used to run the ogr2ogr.exe program.
    This is how the process tab looks like .
    Executable : C:\gdal_ogr2ogr\bin\gdal\apps\ogr2ogr.exe
    Argument :  -f MSSQLSpatial   MSSQL:server=SQL-ABC-DEV;database=MYSIMPLE_Dev;Trusted_Connection=True;\\mypath\files\shares\Data\www.mypage.htm\my_sample_file.shp
    Success value : 1 (I am not sure why I need to change this value from 0 to 1.
    For above settings, package runs fine. However the spatial table is not created always. It is created once in a while after switching Success value from 1 to 0 and 0 to 1 again. (After the spatial table is created, it is dropped using a execute sql statement).
    If I run this command SDKShell.bat file, it always works.
    I am running this in VS 2012.I saw in an article that we need to convert shp file to csv before we load it into sql server.I even tried to convert shp to csv using execute sql task and ogr2ogr.exe. Still the package runs successfully after changing Success
    value from 0 to 1 but no csv file is created. If the success value is 0, it throws the following error.
    [Execute Process Task] Error: In Executing "C:\gdal_ogr2ogr\bin\gdal\apps\ogr2ogr.exe" " -f CSV \\xxxxxxxxr.rdn\files\shares\xxx_Data\ImportData\www.xxxxxxx.hapepage.htm\xxxxxx\Watches\Warnings\myfile\CSV \\xxxxxxxxr.rdn\files\shares\xxx_Data\ImportData\www.xxxxxxx.hapepage.htm\xxxxxx\Watches\Warnings\myfiles\www.shp"
    at "", The process exit code was "1" while the expected was "0".
    Could long file name be a problem too?
    Thanks for your help in advance..
    shamen

    Thank you Andreas
    Yes I can run it manually without getting any error.I am also new to ogr2ogr.exe. This is used to load shape files into sql server.
    Actually this execute process task was located inside a for each loop. As no parameter is passed from for each loop to execute process task, I placed the execute process task outside of for each loop. Now it is working.
    Every time when the package is run, execute process task create a spatial table in the db.
    Still I don't know why it is not working when I place it inside the for each loop container.
    Thanks
    shamen http://stalkingnightmare.wordpress.com/about/

  • IWeb images not showing on google image search

    I've created an iWeb website but can't find any of my images on google image search, although the site appears on web search. I've created new sitemaps 4 days ago, tagged the images with iWeb SEO... I've made two separate pages of images only, not the photo album pages which I think are difficult to search / tag.
    Does anyone know how long it takes Google image search to list your images. It already has listed my website on web / text search for sometime.

    Mia12 wrote:
    ...the site appears on web search.
    Do sub-pages of your site appear? I'm wondering whether your images aren't being found because the sub-pages in which they reside are not being found...
    One of the biggest problems with iWeb is the way it creates your navigation bars. Instead of using standard HTML which search engines can use to correctly find all files on your website, it uses Javascript which makes it extremely hard for search engines to scan and index your website properly.
    ...Quoted from this article:
    _How to get your iWeb Websites into Google & Other Major Search Engines_
    See also:
    http://www.iwebformusicians.com/SearchEngines/SEO.html

  • OSX 10.6.8 Firefox 30.0 can't open images from google image search results I can't left click on a google image search result to open the image.

    OSX 10.6.8 Firefox 30.0 can't open images from google image search results
    I can't left click on a google image search resultt to open the image. This works fine on Safari so is not a mouse issue. When I tried to ask this question in Firefox when I left clicked on the ASK THIS button nothing happened
    Originally posted in OS section - Sorry

    Do you otherwise have problems with the mouse in Firefox?
    You can try these steps in case of issues with web pages:
    You can reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox > Preferences > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox > Preferences > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • SQL*LOADER shape file

    Hallo,
    I have a shape file and now want to load with this shp2sdo. I tried it once and it worked but
    with my actual data I have problems.
    1. I don't know what srid the following is. I have already searched my database but I didn't found one.
    PROJCS["WGS_1984_UTM_Zone_32N",GEOGCS["GCS_WGS_1984",
    DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],
    PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION
    ["Transverse_Mercator"],PARAMETER["False_Easting",32500000],PARAMETER
    ["False_Northing",0],PARAMETER["Central_Meridian",9],PARAMETER
    ["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0],UNIT["Meter",1]]
    2. There is always the error that
    commit point reached - logical error
    And I really don't know how to fix it.
    Thanks Jade

    Hi,
    The closest SRID for the information you've input is 82344. However the conversion from degrees to radians is off slightly, as is the false easting value.
    You may have to create your own coordinate system for your data.
    Regarding the logical error, can you look in the log files and see if anything in there gives a clue as to what the problem is?
    Thanks,
    dan

Maybe you are looking for

  • How to calculate the individual sums of multiple columns in a single query

    Hello, Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this c

  • HT2490 the "X" to close tabs on my macbook is gone how do I get it back to work again

    the "X" to close tabs on my macbook is gone how do I get it back to work again

  • ORACLE 10g on Windows 7 x86 & x64

    Hi Hope I'm posting this in to the right place. I need to install ORACLE 10g (Standard or Personal NOT Express) on Windows 7 x64(my desktop) and x86(my laptop). As far as I know Windows 7 is not one of the officially supported OS but is there any way

  • Won´t send back to FCP

    Hi everybody. I have a big problem: When I´m done with my grading in Color, and has rendered, I go to " send to FCP"- it sends a xml file- but it doesn´t show up in FCP with the ( from Color)?? FCP doesn´t seem to read it? I´m completely lost- I have

  • To buy iMovie6 or wait for iMovie 7

    I am using iMovie 4 and wondering if I should spend the money for iMovie6, wait for iMovie7 or just keep on using iMovie 4. Will iMovie7 require the new Leopard operating system?